docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method Divide

    Divide(Vector3, Vector3)

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

    Declaration
    public static Vector3 Divide(this Vector3 value, Vector3 scale)
    Parameters
    Type Name Description
    Vector3 value

    Input value to scale.

    Vector3 scale

    Vector3 used to scale components of input value.

    Returns
    Type Description
    Vector3

    Scaled input value.

    Exceptions
    Type Condition
    DivideByZeroException

    Thrown if scale parameter has any 0 values. Consider using SafeDivide(Vector3, Vector3).

    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)