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

math.tzcnt

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

Parameters

Parameter Description
x Input to use when computing the trailing zero count.

Returns

int Returns the trailing zero count of the input.

Description

Computes the trailing zero count in the binary representation of the input value.

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.


Declaration

public static int2 tzcnt(int2 x);

Parameters

Parameter Description
x Input to use when computing the trailing zero count.

Returns

int2 Returns the component-wise trailing zero count of the input.

Description

Computes the component-wise trailing zero count in the binary representation of the input value.

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.


Declaration

public static int3 tzcnt(int3 x);

Parameters

Parameter Description
x Input to use when computing the trailing zero count.

Returns

int3 Returns the component-wise trailing zero count of the input.

Description

Computes the component-wise trailing zero count in the binary representation of the input value.

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.


Declaration

public static int4 tzcnt(int4 x);

Parameters

Parameter Description
x Input to use when computing the trailing zero count.

Returns

int4 Returns the component-wise trailing zero count of the input.

Description

Computes the component-wise trailing zero count in the binary representation of the input value.

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.


Declaration

public static int tzcnt(uint x);

Parameters

Parameter Description
x Input to use when computing the trailing zero count.

Returns

int Returns the trailing zero count of the input.

Description

Computes the trailing zero count in the binary representation of the input value.

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.


Declaration

public static int2 tzcnt(uint2 x);

Parameters

Parameter Description
x Input to use when computing the trailing zero count.

Returns

int2 Returns the component-wise trailing zero count of the input.

Description

Computes the component-wise trailing zero count in the binary representation of the input value.

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.


Declaration

public static int3 tzcnt(uint3 x);

Parameters

Parameter Description
x Input to use when computing the trailing zero count.

Returns

int3 Returns the component-wise trailing zero count of the input.

Description

Computes the component-wise trailing zero count in the binary representation of the input value.

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.


Declaration

public static int4 tzcnt(uint4 x);

Parameters

Parameter Description
x Input to use when computing the trailing zero count.

Returns

int4 Returns the component-wise trailing zero count of the input.

Description

Computes the component-wise trailing zero count in the binary representation of the input value.

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.


Declaration

public static int tzcnt(long x);

Parameters

Parameter Description
x Input to use when computing the trailing zero count.

Returns

int Returns the trailing zero count of the input.

Description

Computes the trailing zero count in the binary representation of the input value.

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.


Declaration

public static int tzcnt(ulong x);

Parameters

Parameter Description
x Input to use when computing the trailing zero count.

Returns

int Returns the trailing zero count of the input.

Description

Computes the trailing zero count in the binary representation of the input value.

Assuming that the least significant bit is on the right, the integer value 4 has a binary representation 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the trailing zero count is zero.