pub fn clamp_t<T>(val: T, low: T, high: T) -> T where T: PartialOrd,
Clamp the given value val to lie between the values low and high.