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

math.lzcnt

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

Parameters

Parameter Description
x Input value.

Returns

int The number of leading zeros of the input.

Description

Returns the componentwise number of leading zeros in the binary representations of an int vector.


Declaration

public static int2 lzcnt(int2 x);

Parameters

Parameter Description
x Input value.

Returns

int2 The componentwise number of leading zeros of the input.

Description

Returns the componentwise number of leading zeros in the binary representations of an int2 vector.


Declaration

public static int3 lzcnt(int3 x);

Parameters

Parameter Description
x Input value.

Returns

int3 The componentwise number of leading zeros of the input.

Description

Returns the componentwise number of leading zeros in the binary representations of an int3 vector.


Declaration

public static int4 lzcnt(int4 x);

Parameters

Parameter Description
x Input value.

Returns

int4 The componentwise number of leading zeros of the input.

Description

Returns the componentwise number of leading zeros in the binary representations of an int4 vector.


Declaration

public static int lzcnt(uint x);

Parameters

Parameter Description
x Input value.

Returns

int The number of leading zeros of the input.

Description

Returns number of leading zeros in the binary representations of a uint value.


Declaration

public static int2 lzcnt(uint2 x);

Parameters

Parameter Description
x Input value.

Returns

int2 The componentwise number of leading zeros of the input.

Description

Returns the componentwise number of leading zeros in the binary representations of a uint2 vector.


Declaration

public static int3 lzcnt(uint3 x);

Parameters

Parameter Description
x Input value.

Returns

int3 The componentwise number of leading zeros of the input.

Description

Returns the componentwise number of leading zeros in the binary representations of a uint3 vector.


Declaration

public static int4 lzcnt(uint4 x);

Parameters

Parameter Description
x Input value.

Returns

int4 The componentwise number of leading zeros of the input.

Description

Returns the componentwise number of leading zeros in the binary representations of a uint4 vector.


Declaration

public static int lzcnt(long x);

Parameters

Parameter Description
x Input value.

Returns

int The number of leading zeros of the input.

Description

Returns number of leading zeros in the binary representations of a long value.


Declaration

public static int lzcnt(ulong x);

Parameters

Parameter Description
x Input value.

Returns

int The number of leading zeros of the input.

Description

Returns number of leading zeros in the binary representations of a ulong value.