docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Class Vector3Extensions

    Extension methods for the Vector3 type.

    Inheritance
    object
    Vector3Extensions
    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 Vector3Extensions

    Methods

    Name Description
    Abs(Vector3)

    Returns the component-wise absolute value of this vector [abs(x), abs(y), abs(z)].

    Divide(Vector3, Vector3)

    Returns a new Vector3 that divides each component of the input value by each component of the scale value.

    Inverse(Vector3)

    Returns the component-wise inverse of this vector [1/x,1/y,1/z].

    MaxComponent(Vector3)

    Returns the largest component of this vector.

    MinComponent(Vector3)

    Returns the smallest component of this vector.

    Multiply(Vector3, Vector3)

    Returns a new vector3 that multiplies each component of both input vectors together.

    SafeDivide(Vector3, Vector3)

    Returns a new Vector3 that divides each component of the input value by each component of the scale value. If any divisor is 0 or the output of the division is a NaN, then the output of that component will be zero.

    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)