clampScalar

fun clampScalar(minVal: Double, maxVal: Double): Vector4

Clamps each component into the scalar range [minVal, maxVal].

Return

A reference to this vector.

Parameters

minVal

The minimum value the components will be clamped to.

maxVal

The maximum value the components will be clamped to.