clamp

Синтаксис

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

Употреба

value
Value to clamp
min
Lower bound
max
Upper bound

Описание

Limits a provided value between two specified bounds.

Връщаща стойност

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