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
- Type: Method
- Namespace: Unity.Mathematics
- Assembly: UnityEngine.MathematicsModule
public static quaternion inversesafe(quaternion q)
Parameters
The quaternion to invert.
Returns
Type | Description |
|---|---|
| quaternion | The 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.