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

math.asint

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 int asint(uint x);

Parameters

Parameter Description
x The uint bits to copy.

Returns

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

Description

Returns the bit pattern of a uint as an int.


Declaration

public static int2 asint(uint2 x);

Parameters

Parameter Description
x The uint2 bits to copy.

Returns

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

Description

Returns the bit pattern of a uint2 as an int2.


Declaration

public static int3 asint(uint3 x);

Parameters

Parameter Description
x The uint3 bits to copy.

Returns

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

Description

Returns the bit pattern of a uint3 as an int3.


Declaration

public static int4 asint(uint4 x);

Parameters

Parameter Description
x The uint4 bits to copy.

Returns

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

Description

Returns the bit pattern of a uint4 as an int4.


Declaration

public static int asint(float x);

Parameters

Parameter Description
x The float bits to copy.

Returns

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

Description

Returns the bit pattern of a float as an int.


Declaration

public static int2 asint(float2 x);

Parameters

Parameter Description
x The float2 bits to copy.

Returns

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

Description

Returns the bit pattern of a float2 as an int2.


Declaration

public static int3 asint(float3 x);

Parameters

Parameter Description
x The float3 bits to copy.

Returns

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

Description

Returns the bit pattern of a float3 as an int3.


Declaration

public static int4 asint(float4 x);

Parameters

Parameter Description
x The float4 bits to copy.

Returns

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

Description

Returns the bit pattern of a float4 as an int4.