MCPcopy Create free account
hub / github.com/DFHack/dfhack / clip_range

Function clip_range

library/include/MiscUtils.h:552–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550
551template<typename T, typename T1, typename T2>
552inline T clip_range(T a, T1 minv, T2 maxv) {
553 if (a < minv) return minv;
554 if (a > maxv) return maxv;
555 return a;
556}
557
558/**
559 * Returns the amount of milliseconds elapsed since the UNIX epoch.

Callers 6

revealInDwarfmodeMapMethod · 0.85
getBiomeRgnPosFunction · 0.85
basic_wet_dry_effectFunction · 0.85
getBiomeTypeWithRefMethod · 0.85
estimate_undergroundFunction · 0.85
df_probeFunction · 0.85

Calls

no outgoing calls

Tested by 1

estimate_undergroundFunction · 0.68