MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / isPowerOfTwo

Function isPowerOfTwo

deps/physx/physx/source/foundation/include/PsBitUtils.h:50–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50PX_INLINE bool isPowerOfTwo(uint32_t x)
51{
52 return x != 0 && (x & (x - 1)) == 0;
53}
54
55// "Next Largest Power of 2
56// Given a binary integer value x, the next largest power of 2 can be computed by a SWAR algorithm

Callers 11

allocateNotThreadSafeMethod · 0.85
reserveMemoryMethod · 0.85
allocateMethod · 0.85
deallocateMethod · 0.85
canReuseMethod · 0.85
reserveMemoryMethod · 0.85
reserveInternalMethod · 0.85
addMethod · 0.85
replaceWithLastMethod · 0.85
allocateNotThreadSafeMethod · 0.85
traverseAABBMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected