SDL Wiki
(This is the legacy documentation for SDL2, the previous stable version; SDL3 is the current stable version.)

SDL_MostSignificantBitIndex32

Use this function to get the index of the most significant (set) bit in a

Header File

Defined in SDL_bits.h

Syntax

SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x);

Function Parameters

Uint32 x the number to find the MSB of.

Return Value

(int) Returns the index of the most significant bit of x, or -1 if x is 0.


CategoryAPI, CategoryAPIFunction, CategoryBits


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.