Skip to content

Function: clamp ​

â–¸ clamp(val, min?, max?): number

Parameters ​

NameTypeDefault value
valnumberundefined
minnumber0
maxnumber1

Returns ​

number

Released under the MIT License.