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

◆ Clamp() [9/13]

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

Definition at line 562 of file Math.cs.

563 {
564 if (min > max)
565 {
566 ThrowMinMaxException(min, max);
567 }
568 if (value < min)
569 {
570 return min;
571 }
572 if (value > max)
573 {
574 return max;
575 }
576 return value;
577 }

References System.value.