MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / Clamp

Function Clamp

SampleFramework12/v1.00/SF12_Math.h:546–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544
545// Clamps a value to the specified range
546template<typename T> T Clamp(T val, T min, T max)
547{
548 Assert_(max >= min);
549
550 if(val < min)
551 val = min;
552 else if(val > max)
553 val = max;
554 return val;
555}
556
557// Clamps a value to [0, 1]
558template<typename T> T Saturate(T val)

Callers 13

SerializeValueMethod · 0.85
SerializeValueMethod · 0.85
ClampMethod · 0.85
SetValueMethod · 0.85
UpdateMethod · 0.85
InitializeMethod · 0.85
ClampMethod · 0.85
FindIntervalFunction · 0.85
SetXRotationMethod · 0.85
InitMethod · 0.85

Calls

no outgoing calls

Tested by 2

ClampMethod · 0.68
FindIntervalFunction · 0.68