MCPcopy Create free account
hub / github.com/processing/p5.js / isPowerOfTwo

Function isPowerOfTwo

src/webgl/utils.js:116–116  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

114 // if it isn't we will set the wrap mode to CLAMP
115 // webgl2 will support npot REPEAT and MIRROR but we don't check for it yet
116 const isPowerOfTwo = (x) => (x & (x - 1)) === 0;
117 const textureData = texture._getTextureDataFromSource();
118
119 let wrapWidth;

Callers 1

setWebGLTextureParamsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected