Table of Contents

Struct F32

Namespace
Xui.GPU.Shaders.Types
Assembly
Xui.Core.dll

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

value float

The float value.

Properties

One

Gets the one constant.

public static F32 One { get; }

Property Value

F32

Zero

Gets the zero constant.

public static F32 Zero { get; }

Property Value

F32

Methods

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and 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

left F32
right F32

Returns

F32

operator /(F32, F32)

Divides two F32 values.

public static F32 operator /(F32 left, F32 right)

Parameters

left F32
right F32

Returns

F32

operator ==(F32, F32)

Tests equality of two F32 values.

public static Bool operator ==(F32 left, F32 right)

Parameters

left F32
right F32

Returns

Bool

operator >(F32, F32)

Tests if left is greater than right.

public static Bool operator >(F32 left, F32 right)

Parameters

left F32
right F32

Returns

Bool

operator >=(F32, F32)

Tests if left is greater than or equal to right.

public static Bool operator >=(F32 left, F32 right)

Parameters

left F32
right F32

Returns

Bool

implicit operator F32(double)

Converts from double to F32 (narrowing).

public static implicit operator F32(double value)

Parameters

value double

Returns

F32

implicit operator F32(NFloat)

Converts from nfloat to F32.

public static implicit operator F32(NFloat value)

Parameters

value NFloat

Returns

F32

implicit operator F32(float)

Converts from float to F32.

public static implicit operator F32(float value)

Parameters

value float

Returns

F32

implicit operator double(F32)

Converts from F32 to double.

public static implicit operator double(F32 value)

Parameters

value F32

Returns

double

implicit operator NFloat(F32)

Converts from F32 to nfloat.

public static implicit operator NFloat(F32 value)

Parameters

value F32

Returns

NFloat

implicit operator float(F32)

Converts from F32 to float.

public static implicit operator float(F32 value)

Parameters

value F32

Returns

float

operator !=(F32, F32)

Tests inequality of two F32 values.

public static Bool operator !=(F32 left, F32 right)

Parameters

left F32
right F32

Returns

Bool

operator <(F32, F32)

Tests if left is less than right.

public static Bool operator <(F32 left, F32 right)

Parameters

left F32
right F32

Returns

Bool

operator <=(F32, F32)

Tests if left is less than or equal to right.

public static Bool operator <=(F32 left, F32 right)

Parameters

left F32
right F32

Returns

Bool

operator *(F32, F32)

Multiplies two F32 values.

public static F32 operator *(F32 left, F32 right)

Parameters

left F32
right F32

Returns

F32

operator -(F32, F32)

Subtracts two F32 values.

public static F32 operator -(F32 left, F32 right)

Parameters

left F32
right F32

Returns

F32

operator -(F32)

Negates an F32 value.

public static F32 operator -(F32 value)

Parameters

value F32

Returns

F32