docs.unity3d.com
    Show / Hide Table of Contents

    Class Mathematics

    Mathematics helper methods

    Inheritance
    Object
    Mathematics
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: GLTFast
    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
    Single

    Length/magnitude of input vector

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023