wrap

fnT wrap(T)(T x, T a, T b) @trusted @safe nothrow @nogc

Returns x wrapped to the range [a, b], wrapping around when out of bounds.