Constructors
constructor
- new Random(sourceRng): Random
Parameters
- sourceRng: RandomGenerator
Methods
getState
- getState(): undefined | readonly number[]
Returns undefined | readonly number[]
next
- next(bits): number
Returns number
nextArrayInt
- nextArrayInt(min, max): {
data: number[];
sign: -1 | 1;
} Parameters
- min: {
data: number[];
sign: -1 | 1;
}data: number[]
sign: -1 | 1
- max: {
data: number[];
sign: -1 | 1;
}data: number[]
sign: -1 | 1
Returns {
data: number[];
sign: -1 | 1;
}
data: number[]
sign: -1 | 1
nextBigInt
- nextBigInt(min, max): bigint
Returns bigint
nextBoolean
- nextBoolean(): boolean
Returns boolean
nextDouble
- nextDouble(): number
Returns number
nextInt
- nextInt(): number
Returns number
- nextInt(min, max): number
Returns number
Wrapper around an instance of a
pure-rand
's random number generator offering a simpler interface to deal with random with impure patterns