num

num.js

Methods

static clamp(number, min, max) → {number}

Keep a number between a min and a max value

Parameters:
Name Type Description
number number

The number to clamp

min number

The minimum value

max number

The maximum value

Returns:
number -

the clamped number