Clamps specified value within the inclusive lower and upper bounds.
Value being clamped.
Lower bounds for the value.
Upper bounds for the value.
The clamped value within the specified bounds.
value
clamp(-10, -5, 5);// -5clamp(10, -5, 5)// 5 Copy
clamp(-10, -5, 5);// -5clamp(10, -5, 5)// 5
Clamps specified value within the inclusive lower and upper bounds.