If the given value is outside the given min/max bounds, instead of clamping the number (as the
clamp function does), this function wraps the value around to the next bound (inclusive).
If takeOverflow is set to true, then any excess after wrapping is continually iterated over
and wrapped again, potentially resulting in wrapping through the min/max bounds multiple times.
If the given value is outside the given min/max bounds, instead of clamping the number (as the
clamp
function does), this function wraps the value around to the next bound (inclusive).If
takeOverflow
is set totrue
, then any excess after wrapping is continually iterated over and wrapped again, potentially resulting in wrapping through the min/max bounds multiple times.