Wrapper around an instance of a pure-rand's random number generator offering a simpler interface to deal with random with impure patterns

Constructors

  • Create a mutable random number generator by cloning the passed one and mutate it

    Parameters

    • sourceRng: RandomGenerator

      Immutable random generator from pure-rand library, will not be altered (a clone will be)

    Returns Random

Methods

  • Generate a random ArrayInt between min (included) and max (included)

    Parameters

    • min: { data: number[]; sign: -1 | 1 }

      Minimal ArrayInt value

    • max: { data: number[]; sign: -1 | 1 }

      Maximal ArrayInt value

    Returns { data: number[]; sign: -1 | 1 }