Method TransformRotation
TransformRotation(in float4x4, in quaternion)
Transforms a 3D rotation by a 4x4 transformation matrix.
Declaration
public static quaternion TransformRotation(this in float4x4 m, in quaternion q)
Parameters
| Type | Name | Description |
|---|---|---|
| float4x4 | m | A transformation matrix |
| quaternion | q | A quaternion representing a 3D rotation. This quaternion does not need to be normalized. |
Returns
| Type | Description |
|---|---|
| quaternion | A quaternion containing the transformed rotation. This quaternion will normalized if the input quaternion is normalized. |
Remarks
This method assumes that m is an affine transformation matrix without shear.