MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / cycleIncrement

Function cycleIncrement

source/core/StarMathCommon.hpp:318–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316// the next increment will start at min.
317template <typename Integer>
318Integer cycleIncrement(Integer val, Integer min, Integer max) {
319 if (val < min || val >= max)
320 return min;
321 else
322 return val + 1;
323}
324
325}

Callers 3

reserveEntityIdMethod · 0.85
nextIdMethod · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68