MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / Clamp

Function Clamp

jni/stasm/misc.h:148–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148template <typename T> T Clamp(const T& x, const T& min, const T& max)
149{
150 return MIN(MAX(x, min), max); // force x to a value between min and max
151}
152
153// Equal() returns true if x == y within reasonable tolerance.
154// The default tolerance 1e-7 is arbitrary but approximately equals FLT_EPSILON.

Callers 4

PixFunction · 0.85
LimitBFunction · 0.85
ForceRectIntoImgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected