Function randomInt

  • Returns a function for generating random integers with a uniform distribution. The minimum allowed value of a returned number is ⌊min⌋ (inclusive), and the maximum is ⌊max - 1⌋ (inclusive) Min defaults to 0.

    Parameters

    • max: number

      The maximum allowed value of a returned number.

    Returns (() => number)

      • (): number
      • Returns a function for generating random integers with a uniform distribution. The minimum allowed value of a returned number is ⌊min⌋ (inclusive), and the maximum is ⌊max - 1⌋ (inclusive) Min defaults to 0.

        Returns number

  • Returns a function for generating random integers with a uniform distribution. The minimum allowed value of a returned number is ⌊min⌋ (inclusive), and the maximum is ⌊max - 1⌋ (inclusive)

    Parameters

    • min: number

      The minimum allowed value of a returned number.

    • max: number

      The maximum allowed value of a returned number.

    Returns (() => number)

      • (): number
      • Returns a function for generating random integers with a uniform distribution. The minimum allowed value of a returned number is ⌊min⌋ (inclusive), and the maximum is ⌊max - 1⌋ (inclusive)

        Returns number