Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
◆
Clamp()
[2/13]
static decimal System.Math.Clamp
(
decimal
value
,
decimal
min
,
decimal
max
)
inline
static
Definition at line
453
of file
Math.cs
.
454
{
455
if
(min > max)
456
{
457
ThrowMinMaxException(min, max);
458
}
459
if
(
value
< min)
460
{
461
return
min;
462
}
463
if
(
value
> max)
464
{
465
return
max;
466
}
467
return
value
;
468
}
System.ExceptionArgument.value
@ value
References
System.value
.
System
Math
Generated by
1.10.0