MCPcopy Create free account
hub / github.com/defold/defold / CalcBitRange

Function CalcBitRange

engine/gui/src/gui.cpp:1463–1470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1461 };
1462
1463 static uint16_t CalcBitRange(uint16_t val) {
1464 uint16_t bit_range = 0;
1465 while (val != 0) {
1466 bit_range++;
1467 val >>= 1;
1468 }
1469 return bit_range;
1470 }
1471
1472 static uint16_t CalcMask(uint16_t bits) {
1473 return (1 << bits) - 1;

Callers 2

UpdateScopeFunction · 0.85
CollectClippersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected