Struct Float2
Represents a two-dimensional floating-point vector in backend-neutral engine space.
public readonly record struct Float2 : IEquatable<Float2>
- Implements
- Inherited Members
Constructors
Float2(float, float)
Represents a two-dimensional floating-point vector in backend-neutral engine space.
public Float2(float X, float Y)
Parameters
Properties
One
Gets the vector whose components are both one.
public static Float2 One { get; }
Property Value
X
public float X { get; init; }
Property Value
Y
public float Y { get; init; }
Property Value
Zero
Gets the zero vector.
public static Float2 Zero { get; }
Property Value
Methods
ToString()
Returns a culture-invariant string representation of the vector.
public override string ToString()
Returns
Operators
operator +(Float2, Float2)
Adds two vectors.
public static Float2 operator +(Float2 left, Float2 right)
Parameters
Returns
operator /(Float2, float)
Divides a vector by a scalar.
public static Float2 operator /(Float2 value, float scalar)
Parameters
Returns
operator *(Float2, float)
Multiplies a vector by a scalar.
public static Float2 operator *(Float2 value, float scalar)
Parameters
Returns
operator -(Float2, Float2)
Subtracts two vectors.
public static Float2 operator -(Float2 left, Float2 right)