Class Quaternions
Inheritance
System.Object
Quaternions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GameKit.Dependencies.Utilities
Assembly: GameKit.Dependencies.dll
Syntax
public static class Quaternions
Methods
Angle(Quaternion, Quaternion, Boolean)
Returns the angle between two quaterions.
Declaration
public static float Angle(this Quaternion a, Quaternion b, bool precise = false)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.Quaternion | a | |
| UnityEngine.Quaternion | b | |
| System.Boolean | precise | True to use a custom implementation with no error tolerance. False to use Unity's implementation which may return 0f due to error tolerance, even while there is a difference. |
Returns
| Type | Description |
|---|---|
| System.Single |
GetRate(Quaternion, Quaternion, Single, out Single, UInt32, Single)
Returns how fast an object must rotate over duration to reach goal.
Declaration
public static float GetRate(this Quaternion a, Quaternion goal, float duration, out float angle, uint interval = 1U, float tolerance = 0F)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.Quaternion | a | |
| UnityEngine.Quaternion | goal | Quaternion to measure distance against. |
| System.Single | duration | How long it should take to move to goal. |
| System.Single | angle | |
| System.UInt32 | interval | A multiplier applied towards interval. Typically this is used for ticks passed. |
| System.Single | tolerance |
Returns
| Type | Description |
|---|---|
| System.Single |
Matches(Quaternion, Quaternion, Boolean)
Returns if two quaternions match.
Declaration
public static bool Matches(this Quaternion a, Quaternion b, bool precise = false)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.Quaternion | a | |
| UnityEngine.Quaternion | b | |
| System.Boolean | precise | True to use a custom implementation with no error tolerance. False to use Unity's implementation which may return a match even when not true due to error tolerance. |
Returns
| Type | Description |
|---|---|
| System.Boolean |