MCPcopy Create free account
hub / github.com/atraczyk/2d-engine / roundUp

Function roundUp

engine/src/utils.cpp:40–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38bool isInRange(int x, int min, int max) { return (x >= min && x <= max); }
39
40int roundUp(int number, int fixedBase) {
41 return (number + fixedBase - 1) & ~(fixedBase - 1);
42}
43
44float roundUp(float number, float fixedBase) {
45 if (fixedBase != 0 && number != 0) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected