SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
SDL3pp_bits.h
1
2#ifndef SDL3PP_BITS_H_
3#define SDL3PP_BITS_H_
4
5#include <SDL3/SDL_bits.h>
6#include "SDL3pp_stdinc.h"
7
8namespace SDL {
9
36constexpr int MostSignificantBitIndex32(Uint32 x)
37{
38 return SDL_MostSignificantBitIndex32(x);
39}
40
59constexpr bool HasExactlyOneBitSet32(Uint32 x)
60{
61 return SDL_HasExactlyOneBitSet32(x);
62}
63
65
66} // namespace SDL
67
68#endif /* SDL3PP_BITS_H_ */
constexpr int MostSignificantBitIndex32(Uint32 x)
Get the index of the most significant (set) bit in a 32-bit number.
Definition SDL3pp_bits.h:36
constexpr bool HasExactlyOneBitSet32(Uint32 x)
Determine if a unsigned 32-bit value has exactly one bit set.
Definition SDL3pp_bits.h:59
the main namespace where all SDL3pp public functions and types live
Definition SDL3pp_assert.h:7