Index
Math Utility

clamp01

clamp01(<-val)

Description

Clamps value between 0 and 1 and returns value. If the value is negative then zero is returned. If value is greater than one then one is returned. If the value is a vector, each element of the vector is clamped separately.

Examples

trace(clamp01(42)) #prints '1'

Index