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

math.asfloat

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 float asfloat(int x);

Parameters

Parameter Description
x The int bits to copy.

Returns

float The float with the same bit pattern as the input.

Description

Returns the bit pattern of an int as a float.


Declaration

public static float2 asfloat(int2 x);

Parameters

Parameter Description
x The int2 bits to copy.

Returns

float2 The float2 with the same bit pattern as the input.

Description

Returns the bit pattern of an int2 as a float2.


Declaration

public static float3 asfloat(int3 x);

Parameters

Parameter Description
x The int3 bits to copy.

Returns

float3 The float3 with the same bit pattern as the input.

Description

Returns the bit pattern of an int3 as a float3.


Declaration

public static float4 asfloat(int4 x);

Parameters

Parameter Description
x The int4 bits to copy.

Returns

float4 The float4 with the same bit pattern as the input.

Description

Returns the bit pattern of an int4 as a float4.


Declaration

public static float asfloat(uint x);

Parameters

Parameter Description
x The uint bits to copy.

Returns

float The float with the same bit pattern as the input.

Description

Returns the bit pattern of a uint as a float.


Declaration

public static float2 asfloat(uint2 x);

Parameters

Parameter Description
x The uint2 bits to copy.

Returns

float2 The float2 with the same bit pattern as the input.

Description

Returns the bit pattern of a uint2 as a float2.


Declaration

public static float3 asfloat(uint3 x);

Parameters

Parameter Description
x The uint3 bits to copy.

Returns

float3 The float3 with the same bit pattern as the input.

Description

Returns the bit pattern of a uint3 as a float3.


Declaration

public static float4 asfloat(uint4 x);

Parameters

Parameter Description
x The uint4 bits to copy.

Returns

float4 The float4 with the same bit pattern as the input.

Description

Returns the bit pattern of a uint4 as a float4.