@clz

@clz

@clz(x: T) U

This function counts the number of leading zeroes in x which is an integer type T.

The return type U is an unsigned integer with the minimum number of bits that can represent the value T.bit_count.

If x is zero, @clz returns T.bit_count.

See also:

  • @ctz
  • @popCount