SDL
2.0
|
Go to the source code of this file.
Functions | |
SDL_FORCE_INLINE int | SDL_MostSignificantBitIndex32 (Uint32 x) |
SDL_FORCE_INLINE SDL_bool | SDL_HasExactlyOneBitSet32 (Uint32 x) |
Functions for fiddling with bits and bitmasks.
Definition in file SDL_bits.h.
SDL_FORCE_INLINE SDL_bool SDL_HasExactlyOneBitSet32 | ( | Uint32 | x | ) |
Definition at line 110 of file SDL_bits.h.
SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32 | ( | Uint32 | x | ) |
Get the index of the most significant bit. Result is undefined when called with 0. This operation can also be stated as "count leading zeroes" and "log base 2".
Definition at line 60 of file SDL_bits.h.