Struct Float3
A 3-component vector of 32-bit floats.
public struct Float3
- Inherited Members
Constructors
Float3(F32)
Initializes a new instance with all components set to the same value.
public Float3(F32 value)
Parameters
valueF32
Float3(F32, F32, F32)
Initializes a new instance of the Float3 struct.
public Float3(F32 x, F32 y, F32 z)
Parameters
Fields
X
The X component.
public F32 X
Field Value
Y
The Y component.
public F32 Y
Field Value
Z
The Z component.
public F32 Z
Field Value
Properties
One
Gets the one vector.
public static Float3 One { get; }
Property Value
XY
Gets the XY swizzle (X, Y).
public readonly Float2 XY { get; }
Property Value
XYZ
Gets the XYZ swizzle (X, Y, Z).
public readonly Float3 XYZ { get; }
Property Value
XZ
Gets the XZ swizzle (X, Z).
public readonly Float2 XZ { get; }
Property Value
XZY
Gets the XZY swizzle (X, Z, Y).
public readonly Float3 XZY { get; }
Property Value
YX
Gets the YX swizzle (Y, X).
public readonly Float2 YX { get; }
Property Value
YXZ
Gets the YXZ swizzle (Y, X, Z).
public readonly Float3 YXZ { get; }
Property Value
YZ
Gets the YZ swizzle (Y, Z).
public readonly Float2 YZ { get; }
Property Value
YZX
Gets the YZX swizzle (Y, Z, X).
public readonly Float3 YZX { get; }
Property Value
ZX
Gets the ZX swizzle (Z, X).
public readonly Float2 ZX { get; }
Property Value
ZXY
Gets the ZXY swizzle (Z, X, Y).
public readonly Float3 ZXY { get; }
Property Value
ZY
Gets the ZY swizzle (Z, Y).
public readonly Float2 ZY { get; }
Property Value
ZYX
Gets the ZYX swizzle (Z, Y, X).
public readonly Float3 ZYX { get; }
Property Value
Zero
Gets the zero vector.
public static Float3 Zero { get; }
Property Value
Methods
Cross(Float3, Float3)
Computes the cross product of two vectors.
public static Float3 Cross(Float3 a, Float3 b)
Parameters
Returns
Normalize(Float3)
Normalizes the vector to unit length.
public static Float3 Normalize(Float3 v)
Parameters
vFloat3
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator +(Float3, Float3)
Adds two vectors.
public static Float3 operator +(Float3 left, Float3 right)
Parameters
Returns
operator /(Float3, F32)
Divides a vector by a scalar.
public static Float3 operator /(Float3 left, F32 right)
Parameters
Returns
operator /(Float3, Float3)
Divides two vectors component-wise.
public static Float3 operator /(Float3 left, Float3 right)
Parameters
Returns
operator *(F32, Float3)
Multiplies a scalar by a vector.
public static Float3 operator *(F32 left, Float3 right)
Parameters
Returns
operator *(Float3, F32)
Multiplies a vector by a scalar.
public static Float3 operator *(Float3 left, F32 right)
Parameters
Returns
operator *(Float3, Float3)
Multiplies two vectors component-wise.
public static Float3 operator *(Float3 left, Float3 right)
Parameters
Returns
operator -(Float3, Float3)
Subtracts two vectors.
public static Float3 operator -(Float3 left, Float3 right)
Parameters
Returns
operator -(Float3)
Negates a vector.
public static Float3 operator -(Float3 value)
Parameters
valueFloat3