MCPcopy Create free account
hub / github.com/RenderKit/embree / ImUpperPowerOfTwo

Function ImUpperPowerOfTwo

tutorials/common/imgui/imgui_internal.h:330–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328static inline bool ImIsPowerOfTwo(int v) { return v != 0 && (v & (v - 1)) == 0; }
329static inline bool ImIsPowerOfTwo(ImU64 v) { return v != 0 && (v & (v - 1)) == 0; }
330static inline int ImUpperPowerOfTwo(int v) { v--; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v++; return v; }
331
332// Helpers: String
333IMGUI_API int ImStricmp(const char* str1, const char* str2);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected