MCPcopy Index your code
hub / github.com/ad-si/LuaCAD / nextPow2

Function nextPow2

OpenCSG/src/channelManager.cpp:40–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 namespace {
39
40 int nextPow2(int value) {
41 if(value <= 0) { return 0; }
42 int result = 1;
43 while(result < value) {
44 result <<= 1;
45 }
46 return result;
47 }
48
49 void defaults() {
50 glViewport(OpenGL::canvasPos[0], OpenGL::canvasPos[1], OpenGL::canvasPos[2], OpenGL::canvasPos[3]);

Callers 1

initMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected