Clamp number
Clamps num
within the inclusive range specified by the boundary values.
- If
num
falls within the range (a
,b
), returnnum
. - Otherwise, return the nearest number in the range.
Clamps num
within the inclusive range specified by the boundary values.
num
falls within the range (a
, b
), return num
.