Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Clamp() [4/13]

static float System.Math.Clamp ( float value,
float min,
float max )
inlinestatic

Definition at line 580 of file Math.cs.

581 {
582 if (min > max)
583 {
584 ThrowMinMaxException(min, max);
585 }
586 if (value < min)
587 {
588 return min;
589 }
590 if (value > max)
591 {
592 return max;
593 }
594 return value;
595 }

References System.value.