#include <nitro/math.h>
u32 MATH_CountTrailingZeros( u32 x );
u32 MATH_CTZ( u32 x );
x | Numeric value to perform calculation. |
Returns the number of consecutive bits set to 0, starting from the lowest-order bit.
This function finds the number of bits set to 0 starting from the lowest-order bit when x is expressed as a binary 32-bit value. 0x80000000 is 31, and 0 is 32. This is an inline function that uses the MATH_CountLeadingZeros
function.
MATH_CTZ
is another name for the MATH_CountTrailingZeros
function.
To count the number of consecutive 0
from the start, the MATH_CountLeadingZeros
function can be used.
MATH_CountLeadingZeros MATH_ILog2
12/22/2005 Initial version.