Wrap value into [min, max) modulo the range size. Useful for cyclic ranges like angles.
Caller steps via value + n; this function handles the wrap-around.
Bounds are swapped if passed in reverse order. Throws when min ≈ max (degenerate range, via approxEqual).
Wrap
valueinto[min, max)modulo the range size. Useful for cyclic ranges like angles. Caller steps viavalue + n; this function handles the wrap-around. Bounds are swapped if passed in reverse order. Throws whenmin ≈ max(degenerate range, viaapproxEqual).