Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

math.f32tof16

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static uint f32tof16(float x);

Parameters

Parameter Description
x The single precision float.

Returns

uint The half precision float representation of the single precision float.

Description

Returns the result converting a float value to its nearest half-precision floating point representation.


Declaration

public static uint2 f32tof16(float2 x);

Parameters

Parameter Description
x The single precision float vector.

Returns

uint2 The half precision float vector representation of the single precision float vector.

Description

Returns the result of a componentwise conversion of a float2 vector to its nearest half-precision floating point representation.


Declaration

public static uint3 f32tof16(float3 x);

Parameters

Parameter Description
x The single precision float vector.

Returns

uint3 The half precision float vector representation of the single precision float vector.

Description

Returns the result of a componentwise conversion of a float3 vector to its nearest half-precision floating point representation.


Declaration

public static uint4 f32tof16(float4 x);

Parameters

Parameter Description
x The single precision float vector.

Returns

uint4 The half precision float vector representation of the single precision float vector.

Description

Returns the result of a componentwise conversion of a float4 vector to its nearest half-precision floating point representation.