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

◆ clamp() [3/13]

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