pub fn wrap<T>(val: T, min: T, max: T) -> Twhere T: Copy + PartialOrd + ClosedAdd + ClosedSub,
Wraps val into the range [min, max] using modular arithmetics.
val
[min, max]
The range must not be empty.