Skip to content
1 min read · 34 words

Function: clamp01() ​

ts
function clamp01(n: number): number;

Defined in: src/batteries/vector/helpers.ts:13

Clamp n into the inclusive [0, 1] range.

Parameters ​

ParameterType
nnumber

Returns ​

number