docs.unity3d.com
    Show / Hide Table of Contents

    Method NextDouble

    NextDouble()

    Returns a uniformly random double value in the interval [0, 1).

    Declaration
    public double NextDouble()
    Returns
    Type Description
    Double

    A uniformly random double value in the range [0, 1).

    NextDouble(Double)

    Returns a uniformly random double value in the interval [0, max).

    Declaration
    public double NextDouble(double max)
    Parameters
    Type Name Description
    Double max

    The maximum value to generate, exclusive.

    Returns
    Type Description
    Double

    A uniformly random double value in the range [0, max).

    NextDouble(Double, Double)

    Returns a uniformly random double value in the interval [min, max).

    Declaration
    public double NextDouble(double min, double max)
    Parameters
    Type Name Description
    Double min

    The minimum value to generate, inclusive.

    Double max

    The maximum value to generate, exclusive.

    Returns
    Type Description
    Double

    A uniformly random double value in the range [min, max).

    In This Article
    • NextDouble()
    • NextDouble(Double)
    • NextDouble(Double, Double)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023