MCPcopy Index your code
hub / github.com/HandmadeMath/HandmadeMath / HMM_Clamp

Function HMM_Clamp

HandmadeMath.h:550–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548
549COVERAGE(HMM_Clamp, 1)
550static inline float HMM_Clamp(float Min, float Value, float Max)
551{
552 ASSERT_COVERED(HMM_Clamp);
553
554 float Result = Value;
555
556 if (Result < Min)
557 {
558 Result = Min;
559 }
560
561 if (Result > Max)
562 {
563 Result = Max;
564 }
565
566 return Result;
567}
568
569
570/*

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected