MCPcopy Create free account
hub / github.com/cinder/Cinder / nextPowerOf2

Function nextPowerOf2

include/cinder/CinderMath.h:283–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283inline uint32_t nextPowerOf2( uint32_t x )
284{
285 x |= (x >> 1);
286 x |= (x >> 2);
287 x |= (x >> 4);
288 x |= (x >> 8);
289 x |= (x >> 16);
290 return(x+1);
291}
292
293//! Returns true if \a x is a power of two, false otherwise.
294inline bool isPowerOf2( size_t x )

Callers 3

renderStringPow2Function · 0.85
initializeMethod · 0.85
getFramesPerBlockMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected