clamp

Syntax

native clamp(value, min = cellmin, max = cellmax);

Usage

value
Value to clamp
min
Lower bound
max
Upper bound

Description

Limits a provided value between two specified bounds.

Return

The value if it is between the lower and upper bound, min if
value is below, max if it is above the specified bounds.