MCPcopy Create free account
hub / github.com/MoeMod/CSMoE / SmallestPowerOfTwoGreaterOrEqual

Function SmallestPowerOfTwoGreaterOrEqual

SourceSDK/public/mathlib/mathlib.h:500–509  ·  view source on GitHub ↗

return the smallest power of two >= x. returns 0 if x == 0 or x > 0x80000000 (ie numbers that would be negative if x was signed) NOTE: the old code took an int, and if you pass in an int of 0x80000000 casted to a uint, you'll get 0x80000000, which is correct for uints, instead of 0, which was correct for ints

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

CUtlHashDictMethod · 0.85
InitMethod · 0.85
DoReallocMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected