Function randomInt

  • Get a random integer within an inclusive range

    Returns

    a random integer between the bounds

    Example

    const value = randomInt(-10, 10)
    // value >= -10
    // value <= 10
    // Math.round(value) === value

    Parameters

    • min: number

      the lower bound of the range

    • max: number

      the upper bound of the range

    Returns number

Generated using TypeDoc