clamp MethodStatic
Clamp value to (min, max) with no test for order of (min, max).
- Always returns a number between
min
andmax
.
clamp(value: number, min: number, max: number): number
Parameter | Type | Description |
---|---|---|
value | number | value to clamp |
min | number | smallest allowed output |
max | number | largest allowed output |
Returns - number
Defined in
- Geometry.ts Line 899
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.