Skip to content

Function clamp() ​

clamp(value: number, min: number, max: number): number

Source: math.utils.ts

Clamps a value between an upper and lower bound.

Parameters ​

value ​

number

The value to clamp.

min ​

number

The lower bound.

max ​

number

The upper bound.

Returns ​

number

The clamped value.

Built by Prozilla