Appearance
Clamp a value in the 0–1 range.
import { clamp01 } from '@studiometa/js-toolkit/utils'; clamp01(0.5); // 0.5 clamp01(1.5); // 1
value
number
0
1