Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


tzcnt

Computes the trailing zero count in the binary representation of the input value.
Read time 5 minutesLast updated 12 days ago

Definition

tzcnt(int)

Computes the trailing zero count in the binary representation of the input value.
public static int tzcnt(int x)

Parameters

Input to use when computing the trailing zero count.

Returns

Type

Description

intReturns the trailing zero count of the input.

Remarks

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.

tzcnt(int2)

Computes the component-wise trailing zero count in the binary representation of the input value.
public static int2 tzcnt(int2 x)

Parameters

Input to use when computing the trailing zero count.

Returns

Type

Description

int2Returns the component-wise trailing zero count of the input.

Remarks

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.

tzcnt(int3)

Computes the component-wise trailing zero count in the binary representation of the input value.
public static int3 tzcnt(int3 x)

Parameters

Input to use when computing the trailing zero count.

Returns

Type

Description

int3Returns the component-wise trailing zero count of the input.

Remarks

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.

tzcnt(int4)

Computes the component-wise trailing zero count in the binary representation of the input value.
public static int4 tzcnt(int4 x)

Parameters

Input to use when computing the trailing zero count.

Returns

Type

Description

int4Returns the component-wise trailing zero count of the input.

Remarks

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.

tzcnt(uint)

Computes the trailing zero count in the binary representation of the input value.
public static int tzcnt(uint x)

Parameters

Input to use when computing the trailing zero count.

Returns

Type

Description

intReturns the trailing zero count of the input.

Remarks

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.

tzcnt(uint2)

Computes the component-wise trailing zero count in the binary representation of the input value.
public static int2 tzcnt(uint2 x)

Parameters

Input to use when computing the trailing zero count.

Returns

Type

Description

int2Returns the component-wise trailing zero count of the input.

Remarks

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.

tzcnt(uint3)

Computes the component-wise trailing zero count in the binary representation of the input value.
public static int3 tzcnt(uint3 x)

Parameters

Input to use when computing the trailing zero count.

Returns

Type

Description

int3Returns the component-wise trailing zero count of the input.

Remarks

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.

tzcnt(uint4)

Computes the component-wise trailing zero count in the binary representation of the input value.
public static int4 tzcnt(uint4 x)

Parameters

Input to use when computing the trailing zero count.

Returns

Type

Description

int4Returns the component-wise trailing zero count of the input.

Remarks

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.

tzcnt(long)

Computes the trailing zero count in the binary representation of the input value.
public static int tzcnt(long x)

Parameters

Input to use when computing the trailing zero count.

Returns

Type

Description

intReturns the trailing zero count of the input.

Remarks

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.

tzcnt(ulong)

Computes the trailing zero count in the binary representation of the input value.
public static int tzcnt(ulong x)

Parameters

Input to use when computing the trailing zero count.

Returns

Type

Description

intReturns the trailing zero count of the input.

Remarks

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.