Function randomFloat

  • Get a random number between the inclusive bounds.

    Parameters

    • Optional lower: number

      The lower bound.

    • Optional upper: number

      The upper bound.

    Returns number

    Returns a random number.

    Since

    0.4.2

    Example

    randomFloat()
    // => a number between 0 or 1
    randomFloat(2)
    // => a number between 0 and 2
    randomFloat(1, 2)
    // => a number between 1 and 2