Method quaternion
quaternion(Single, Single, Single, Single)
Returns a quaternion constructed from four float values.
Declaration
public static quaternion quaternion(float x, float y, float z, float w)
Parameters
Type | Name | Description |
---|---|---|
Single | x | The x component of the quaternion. |
Single | y | The y component of the quaternion. |
Single | z | The z component of the quaternion. |
Single | w | The w component of the quaternion. |
Returns
Type | Description |
---|---|
quaternion | The quaternion constructed from individual components. |
quaternion(float4)
Returns a quaternion constructed from a float4 vector.
Declaration
public static quaternion quaternion(float4 value)
Parameters
Type | Name | Description |
---|---|---|
float4 | value | The float4 containing the components of the quaternion. |
Returns
Type | Description |
---|---|
quaternion | The quaternion constructed from a float4. |
quaternion(float3x3)
Returns a unit quaternion constructed from a float3x3 rotation matrix. The matrix must be orthonormal.
Declaration
public static quaternion quaternion(float3x3 m)
Parameters
Type | Name | Description |
---|---|---|
float3x3 | m | The float3x3 rotation matrix. |
Returns
Type | Description |
---|---|
quaternion | The quaternion constructed from a float3x3 matrix. |
quaternion(float4x4)
Returns a unit quaternion constructed from a float4x4 matrix. The matrix must be orthonormal.
Declaration
public static quaternion quaternion(float4x4 m)
Parameters
Type | Name | Description |
---|---|---|
float4x4 | m | The float4x4 matrix (must be orthonormal). |
Returns
Type | Description |
---|---|
quaternion | The quaternion constructed from a float4x4 matrix. |