Clips a value to the range max, min.
The clipped value.
Value to clip.
Minimum value of range.
Maximum value of range.