Clamps a value between an inclusive range.
- Version
- 2.0.0
Example
clamp(10, 0, 5); // Returns 5
clamp(-5, 0, 5); // Returns 0
clamp(3, 0, 5); // Returns 3
Clamps a value between an inclusive range.
clamp(10, 0, 5); // Returns 5
clamp(-5, 0, 5); // Returns 0
clamp(3, 0, 5); // Returns 3