clamp

fun clamp(value: Cartesian4, min: Cartesian4, max: Cartesian4, result: Cartesian4): Cartesian4(source)

Constrain a value to lie between two values.

Return

The clamped value such that min <= result <= max.

Parameters

value

The value to clamp.

min

The minimum bound.

max

The maximum bound.

result

The object into which to store the result.

See also