Clamps x to the range [lo, hi].
x if it is within the range, otherwise lo or hi.
The value to clamp.
The lower bound.
The upper bound.