docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method SafeDivide

    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.

    Declaration
    public static Vector3 SafeDivide(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.

    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)