Struct Float4
A 4-component vector of 32-bit floats.
public struct Float4
- Inherited Members
Constructors
Float4(F32)
Initializes a new instance with all components set to the same value.
public Float4(F32 value)
Parameters
valueF32
Float4(F32, F32, F32, F32)
Initializes a new instance of the Float4 struct.
public Float4(F32 x, F32 y, F32 z, F32 w)
Parameters
Float4(Float2, F32, F32)
Initializes a new instance from a Float2 and z, w components.
public Float4(Float2 xy, F32 z, F32 w)
Parameters
Float4(Float3, F32)
Initializes a new instance from a Float3 and w component.
public Float4(Float3 xyz, F32 w)
Parameters
Fields
W
The W component.
public F32 W
Field Value
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 Float4 One { get; }
Property Value
RGB
Gets the RGB swizzle (X, Y, Z) - color alias for XYZ.
public readonly Float3 RGB { get; }
Property Value
RGBA
Gets the RGBA swizzle (X, Y, Z, W) - color alias for XYZW.
public readonly Float4 RGBA { get; }
Property Value
XW
Gets the XW swizzle (X, W).
public readonly Float2 XW { get; }
Property Value
XY
Gets the XY swizzle (X, Y).
public readonly Float2 XY { get; }
Property Value
XYW
Gets the XYW swizzle (X, Y, W).
public readonly Float3 XYW { get; }
Property Value
XYZ
Gets the XYZ swizzle (X, Y, Z).
public readonly Float3 XYZ { get; }
Property Value
XYZW
Gets the XYZW swizzle (X, Y, Z, W).
public readonly Float4 XYZW { get; }
Property Value
XZ
Gets the XZ swizzle (X, Z).
public readonly Float2 XZ { get; }
Property Value
XZW
Gets the XZW swizzle (X, Z, W).
public readonly Float3 XZW { get; }
Property Value
YW
Gets the YW swizzle (Y, W).
public readonly Float2 YW { get; }
Property Value
YZ
Gets the YZ swizzle (Y, Z).
public readonly Float2 YZ { get; }
Property Value
YZW
Gets the YZW swizzle (Y, Z, W).
public readonly Float3 YZW { get; }
Property Value
ZW
Gets the ZW swizzle (Z, W).
public readonly Float2 ZW { get; }
Property Value
Zero
Gets the zero vector.
public static Float4 Zero { get; }
Property Value
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator +(Float4, Float4)
Adds two vectors.
public static Float4 operator +(Float4 left, Float4 right)
Parameters
Returns
operator /(Float4, F32)
Divides a vector by a scalar.
public static Float4 operator /(Float4 left, F32 right)
Parameters
Returns
operator /(Float4, Float4)
Divides two vectors component-wise.
public static Float4 operator /(Float4 left, Float4 right)
Parameters
Returns
operator *(F32, Float4)
Multiplies a scalar by a vector.
public static Float4 operator *(F32 left, Float4 right)
Parameters
Returns
operator *(Float4, F32)
Multiplies a vector by a scalar.
public static Float4 operator *(Float4 left, F32 right)
Parameters
Returns
operator *(Float4, Float4)
Multiplies two vectors component-wise.
public static Float4 operator *(Float4 left, Float4 right)
Parameters
Returns
operator -(Float4, Float4)
Subtracts two vectors.
public static Float4 operator -(Float4 left, Float4 right)
Parameters
Returns
operator -(Float4)
Negates a vector.
public static Float4 operator -(Float4 value)
Parameters
valueFloat4