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

◆ clamp() [7/13]

static slong xtd::math::clamp ( slong  value,
slong  min,
slong  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.