clamp

fun clamp(value: Cartesian2, min: Cartesian2, max: Cartesian2, result: Cartesian2): Cartesian2(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