clamp

fun clamp(min: Vector4, max: Vector4): Vector4

Clamps each component into the range [min, max] (assumed component-wise min <= max).

Return

A reference to this vector.

Parameters

min

The minimum x, y and z values.

max

The maximum x, y and z values in the desired range.