acosClamped

Computes Math.acos(value), but first clamps value to the range -1.0, 1.0 so that the function will never return NaN.

Return

The acos of the value if the value is in the range -1.0, 1.0, or the acos of -1.0 or 1.0, whichever is closer, if the value is outside the range.

Parameters

value

The value for which to compute acos.

See also