docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Class MathUtility

    Math utilities.

    Inheritance
    object
    MathUtility
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils
    Assembly: solution.dll
    Syntax
    public static class MathUtility

    Methods

    Name Description
    Approximately(float, float)

    A faster replacement for Approximately(float, float).

    ApproximatelyZero(float)

    A slightly faster way to do Approximately(a, 0f).

    Clamp(double, double, double)

    Constrains a value between a minimum and a maximum.

    FirstActiveFlagIndex(int)

    Returns the index of the first true bit of a flag.

    IsAxisAligned(Vector3)

    Checks if a vector is aligned with one of the axis vectors.

    IsPositivePowerOfTwo(int)

    Checks if a value is a positive power of two.

    IsUndefined(float)

    Checks whether a value is undefined (PositiveInfinity, NegativeInfinity, or NaN).

    ShortestAngleDistance(double, double, double, double)

    Finds the smallest angle between two angles.

    ShortestAngleDistance(float, float, float, float)

    Finds the smallest angle between two angles.

    In This Article
    Back to top
    Copyright © 2024 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)