MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / IsPow2

Function IsPow2

engine/Poseidon/Graphics/Textures/JpgImport.cpp:36–39  ·  view source on GitHub ↗

Pow2 + min/max. Matches the old IJL path's constraint.

Source from the content-addressed store, hash-verified

34
35// Pow2 + min/max. Matches the old IJL path's constraint.
36bool IsPow2(int x)
37{
38 return x > 0 && (x & (x - 1)) == 0;
39}
40
41int Log2i(int x)
42{

Callers 1

InitFromMemoryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected