API Reference > Geometry-core > CartesianGeometry > Geometry > restrictToInterval restrictToInterval MethodStatic restrict x so it is in the interval [a,b], allowing a,b to be in either order. restrictToInterval(x: number, a: number, b: number): number Parameter Type Description x number a number (usually the lower) interval limit b number (usually the upper) interval limit Returns - number Defined in core/geometry/src/Geometry.ts Line 754 Last Updated: 13 June, 2024