Method f32tof16
f32tof16(float)
Returns the result converting a float value to its nearest half-precision floating point representation.
Declaration
public static uint f32tof16(float x)
Parameters
| Type | Name | Description |
|---|---|---|
| float | x | The single precision float. |
Returns
| Type | Description |
|---|---|
| uint | The half precision float representation of the single precision float. |
f32tof16(float2)
Returns the result of a componentwise conversion of a float2 vector to its nearest half-precision floating point representation.
Declaration
public static uint2 f32tof16(float2 x)
Parameters
| Type | Name | Description |
|---|---|---|
| float2 | x | The single precision float vector. |
Returns
| Type | Description |
|---|---|
| uint2 | The half precision float vector representation of the single precision float vector. |
f32tof16(float3)
Returns the result of a componentwise conversion of a float3 vector to its nearest half-precision floating point representation.
Declaration
public static uint3 f32tof16(float3 x)
Parameters
| Type | Name | Description |
|---|---|---|
| float3 | x | The single precision float vector. |
Returns
| Type | Description |
|---|---|
| uint3 | The half precision float vector representation of the single precision float vector. |
f32tof16(float4)
Returns the result of a componentwise conversion of a float4 vector to its nearest half-precision floating point representation.
Declaration
public static uint4 f32tof16(float4 x)
Parameters
| Type | Name | Description |
|---|---|---|
| float4 | x | The single precision float vector. |
Returns
| Type | Description |
|---|---|
| uint4 | The half precision float vector representation of the single precision float vector. |