restrictToInterval MethodStatic
Restrict x so it is in the interval [a,b] (allowing a and b to be in either order).
restrictToInterval(x: number, a: number, b: number): number
| Parameter | Type | Description |
|---|---|---|
| x | number | value to restrict |
| a | number | (usually the lower) interval limit |
| b | number | (usually the upper) interval limit |
Returns - number
Defined in
- Geometry.ts Line 1274
Last Updated: 24 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.