Clamps a value to the inclusive range [min, max].
[min, max]
The value to clamp.
Lower bound (inclusive).
Upper bound (inclusive).
The clamped value.
clamp(15, 0, 10); // 10clamp(-2n, -1n, 5n); // -1n Copy
clamp(15, 0, 10); // 10clamp(-2n, -1n, 5n); // -1n
Clamps a value to the inclusive range
[min, max].