clamp

fnT clamp(T)(T x, T a, T b)

Returns x clamped to the range [a, b].