MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / log2

Function log2

TheForceEngine/TFE_System/math.h:24–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22 }
23
24 inline u32 log2(u32 x)
25 {
26 if (x == 0 || x == 1) { return 0; }
27
28 u32 l2 = 0;
29 while (x > 1)
30 {
31 l2++;
32 x >>= 1;
33 }
34 return l2;
35 }
36
37 inline u32 nextPow2(u32 x)
38 {

Callers 4

bilinearSharpnessFunction · 0.85
computeMipLevelFunction · 0.85
thumbnailSizeControlFunction · 0.85
bitmap_writeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected