Package io.github.libsdl4j.api.bits
Class SdlBits
- java.lang.Object
-
- io.github.libsdl4j.api.bits.SdlBits
-
public final class SdlBits extends Object
Definitions from file SDL_bits.hFunctions for fiddling with bits and bitmasks.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
SDL_HasExactlyOneBitSet32(int x)
static int
SDL_MostSignificantBitIndex32(int x)
Get the index of the most significant bit.
-
-
-
Method Detail
-
SDL_MostSignificantBitIndex32
public static int SDL_MostSignificantBitIndex32(int x)
Get the index of the most significant bit. This operation can also be stated as "count leading zeroes" and "log base 2".- Returns:
- the index of the most significant bit, or -1 if the value is 0.
-
SDL_HasExactlyOneBitSet32
public static boolean SDL_HasExactlyOneBitSet32(int x)
-
-