Class SdlBits


  • public final class SdlBits
    extends Object
    Definitions from file SDL_bits.h

    Functions for fiddling with bits and bitmasks.

    • 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)