Home > @infiniteobjects/core-library-node > Numbers > clamp
Clamps num within the inclusive range specified by the boundary values
Signature:
static clamp(num: number, max: number, min: number): number;
| Parameter | Type | Description |
|---|---|---|
| num | number | Number to clamp |
| max | number | boundary top |
| min | number | boundary bottom |
Returns:
number