Documentation

Unity Engine

Download Unity

Unity Engine

inversesafe(quaternion)

Returns the inverse of a quaternion value, or the identity if the quaternion has zero length.
Read time 1 minuteLast updated 5 days ago

Definition

public static quaternion inversesafe(quaternion q)

Parameters

The quaternion to invert.

Returns

Type

Description

quaternionThe quaternion inverse of the input quaternion, or the identity quaternion.

Remarks

Unlike math.inverse, this function never divides by zero. A quaternion whose squared length isn't greater than math.FLT_MIN_NORMAL returns the identity.