xtd 0.2.0
Loading...
Searching...
No Matches

◆ clamp() [5/13]

static int32 xtd::math::clamp ( int32  value,
int32  min,
int32  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.