- mersenneTwister(seed?): {
float: (() => number);
integer: ((maxExclusive: number, minInclusive?: number) => number);
} Returns {
float: (() => number);
integer: ((maxExclusive: number, minInclusive?: number) => number);
}
float: (() => number)
integer: ((maxExclusive: number, minInclusive?: number) => number)
- (maxExclusive, minInclusive?): number
Parameters
- maxExclusive: number
- minInclusive: number = 0
Returns number
Reproducible random values using the Merseene Twister algorithm. With the same seed value, it produces the same series of random values.
Integer values can also be produced. First parameter is the maximum value (exclusive), the optional second parameter is the minimum value (inclusive).
Adapted from George MacKerron's implementation. MIT License. https://github.com/jawj/mtwist/