clamp

fun clamp(cartesian: Cartesian3, min: Cartesian3, max: Cartesian3, result: Cartesian3): Cartesian3(source)

Constrain a value to lie between two values.

Return

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

Parameters

cartesian

The value to clamp.

min

The minimum bound.

max

The maximum bound.

result

The object into which to store the result.

See also