[−][src]Function nalgebra::clamp
pub fn clamp<T: PartialOrd>(val: T, min: T, max: T) -> T
Returns a reference to the input value clamped to the interval [min, max]
.
In particular:
* If min < val < max
, this returns val
.
* If val <= min
, this returns min
.
* If val >= max
, this returns max
.