CLAMP Expression
CLAMP constrains a numeric value to a minimum and maximum.
Syntax
All three arguments are parsed as numbers. min must not be greater than max; the production implementation rejects that case.
Behavior
- values below
minreturnmin; - values above
maxreturnmax; - values already inside the range are returned unchanged.
Examples
These forms are already covered by ACE's expression tests: