MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / ImUpperPowerOfTwo

Function ImUpperPowerOfTwo

KBotExt/imgui/imgui_internal.h:346–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344static inline bool ImIsPowerOfTwo(int v) { return v != 0 && (v & (v - 1)) == 0; }
345static inline bool ImIsPowerOfTwo(ImU64 v) { return v != 0 && (v & (v - 1)) == 0; }
346static inline int ImUpperPowerOfTwo(int v) { v--; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v++; return v; }
347
348// Helpers: String
349IMGUI_API int ImStricmp(const char* str1, const char* str2);

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected