MCPcopy Index your code
hub / github.com/processing/processing / nextPowerOfTwo

Method nextPowerOfTwo

core/src/processing/opengl/PGL.java:1590–1594  ·  view source on GitHub ↗
(int val)

Source from the content-addressed store, hash-verified

1588
1589 // bit shifting this might be more efficient
1590 protected static int nextPowerOfTwo(int val) {
1591 int ret = 1;
1592 while (ret < val) ret <<= 1;
1593 return ret;
1594 }
1595
1596
1597 /**

Callers 4

setSizeMethod · 0.95
createFBOLayerMethod · 0.95
restoreFirstFrameMethod · 0.95
initTextureMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected