#include <nitro/math.h>
u32 MATH_GetMostSignificantBit( u32 x );
u32 MATH_MSB( u32 x );
x |
Numeric value to perform calculation. |
Returns the highest order bit set to 1.
This function looks for the highest order bit that is set to 1 when x is expressed as a binary 32-bit value. 10(01010b) is 8(01000b), and 0 is 0.
MATH_MSB
is another name for the MATH_GetMostSignificantBit
function.
The lowest order bit set to 1 can be found with the MATH_GetLeastSignificantBit
function.
MATH_GetLeastSignificantBit MATH_ILog2
12/22/2005 Initial version.