Struct F32
Shader 32-bit floating-point scalar type. This is the fundamental scalar type for shader math operations.
public readonly struct F32
- Inherited Members
Remarks
In CPU execution, this may be represented as a single float (in vertex stage) or as a quad of floats (in fragment stage for derivative support).
Constructors
F32(float)
Initializes a new instance of the F32 struct.
public F32(float value)
Parameters
valuefloatThe float value.
Properties
One
Gets the one constant.
public static F32 One { get; }
Property Value
Zero
Gets the zero constant.
public static F32 Zero { get; }
Property Value
Methods
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator +(F32, F32)
Adds two F32 values.
public static F32 operator +(F32 left, F32 right)
Parameters
Returns
operator /(F32, F32)
Divides two F32 values.
public static F32 operator /(F32 left, F32 right)
Parameters
Returns
operator ==(F32, F32)
Tests equality of two F32 values.
public static Bool operator ==(F32 left, F32 right)
Parameters
Returns
operator >(F32, F32)
Tests if left is greater than right.
public static Bool operator >(F32 left, F32 right)
Parameters
Returns
operator >=(F32, F32)
Tests if left is greater than or equal to right.
public static Bool operator >=(F32 left, F32 right)
Parameters
Returns
implicit operator F32(double)
Converts from double to F32 (narrowing).
public static implicit operator F32(double value)
Parameters
valuedouble
Returns
implicit operator F32(NFloat)
Converts from nfloat to F32.
public static implicit operator F32(NFloat value)
Parameters
valueNFloat
Returns
implicit operator F32(float)
Converts from float to F32.
public static implicit operator F32(float value)
Parameters
valuefloat
Returns
implicit operator double(F32)
Converts from F32 to double.
public static implicit operator double(F32 value)
Parameters
valueF32
Returns
implicit operator NFloat(F32)
Converts from F32 to nfloat.
public static implicit operator NFloat(F32 value)
Parameters
valueF32
Returns
implicit operator float(F32)
Converts from F32 to float.
public static implicit operator float(F32 value)
Parameters
valueF32
Returns
operator !=(F32, F32)
Tests inequality of two F32 values.
public static Bool operator !=(F32 left, F32 right)
Parameters
Returns
operator <(F32, F32)
Tests if left is less than right.
public static Bool operator <(F32 left, F32 right)
Parameters
Returns
operator <=(F32, F32)
Tests if left is less than or equal to right.
public static Bool operator <=(F32 left, F32 right)
Parameters
Returns
operator *(F32, F32)
Multiplies two F32 values.
public static F32 operator *(F32 left, F32 right)
Parameters
Returns
operator -(F32, F32)
Subtracts two F32 values.
public static F32 operator -(F32 left, F32 right)
Parameters
Returns
operator -(F32)
Negates an F32 value.
public static F32 operator -(F32 value)
Parameters
valueF32