Class QuaternionExtensions
Numeric-related extension methods for
Inheritance
System.Object
QuaternionExtensions
Namespace: X10D.Numerics
Assembly: X10D.dll
Syntax
public static class QuaternionExtensions : object
Methods
| Improve this Doc View SourceMultiply(Quaternion, Vector3)
Rotates the specified point with the specified rotation.
Declaration
public static Vector3 Multiply(this in Quaternion rotation, in Vector3 point)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | rotation | The rotation. |
Vector3 | point | The point. |
Returns
Type | Description |
---|---|
Vector3 | The rotated point. |
ToAxisAngle(Quaternion)
Converts this quaternion to an axis/angle pair.
Declaration
public static (Vector3 Axis, float Angle) ToAxisAngle(this in Quaternion value)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | value | The quaternion to convert. |
Returns
Type | Description |
---|---|
System.ValueTuple<Vector3, System.Single> | A tuple containing the converted axis, and the angle in radians. |
ToVector3(Quaternion)
Converts this quaternion to a
Declaration
public static Vector3 ToVector3(this in Quaternion value)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | value | The quaternion to convert. |
Returns
Type | Description |
---|---|
Vector3 | The Euler representation of |