docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Mathematics

    Mathematics helper methods

    Inheritance
    object
    Mathematics
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Cloud.Gltfast
    Assembly: Unity.Cloud.Gltfast.dll
    Syntax
    [MovedFrom(true, "GLTFast", "glTFast", null)]
    public static class Mathematics

    Methods

    Decompose(double4x4, out double3, out double4, out double3)

    Decomposes a 4x4 TRS matrix into separate transforms (translation * rotation * scale) Matrix may not contain skew

    Declaration
    public static void Decompose(this double4x4 m, out double3 translation, out double4 rotation, out double3 scale)
    Parameters
    Type Name Description
    double4x4 m

    Input matrix

    double3 translation

    Translation

    double4 rotation

    Rotation

    double3 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

    RotateY(double)

    Returns double4 quaternion values that rotates around the y-axis by a given number of radians.

    Declaration
    public static double4 RotateY(double angle)
    Parameters
    Type Name Description
    double angle

    The clockwise rotation angle when looking along the y-axis towards the origin in radians.

    Returns
    Type Description
    double4

    Quaternion values representing a rotation around the y-axis.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)