Class Mathematics
Mathematics helper methods
Inherited Members
Namespace: GLTFast
Assembly: solution.dll
Syntax
public static class Mathematics
Methods
Decompose(float4x4, out float3, out float4, out float3)
Decomposes a 4x4 TRS matrix into separate transforms (translation * rotation * scale) Matrix may not contain skew
Declaration
public static void Decompose(this float4x4 m, out float3 translation, out float4 rotation, out float3 scale)
Parameters
Type | Name | Description |
---|---|---|
float4x4 | m | Input matrix |
float3 | translation | Translation |
float4 | rotation | Rotation |
float3 | scale | Scale |
Decompose(Matrix4x4, out Vector3, out Quaternion, out Vector3)
Decomposes a 4x4 TRS matrix into separate transforms (translation * rotation * scale) Matrix may not contain skew
Declaration
public static void Decompose(this Matrix4x4 m, out Vector3 translation, out Quaternion rotation, out Vector3 scale)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | m | Input matrix |
Vector3 | translation | Translation |
Quaternion | rotation | Rotation |
Vector3 | scale | Scale |
Normalize(float2, out float2)
Normalizes a vector
Declaration
public static float Normalize(float2 input, out float2 output)
Parameters
Type | Name | Description |
---|---|---|
float2 | input | Input vector |
float2 | output | Normalized output vector |
Returns
Type | Description |
---|---|
float | Length/magnitude of input vector |