Restricts a value to a defined minimum and/or maximum. Returns the minimum if the value is below, the maximum if above, or the value itself if in range. Throws if min > max and both are defined.
The value to clamp.
Optional
Optional lower bound (inclusive).
Optional upper bound (inclusive).
The clipped value.
If min > max.
Restricts a value to a defined minimum and/or maximum. Returns the minimum if the value is below, the maximum if above, or the value itself if in range. Throws if min > max and both are defined.