pub fn clamp<S: Scalar>(x: S, lo: S, hi: S) -> S
Clamp x into [lo, hi] using three-valued comparisons.
x
[lo, hi]