Mersenne
Module to generate seed based random numbers.
Rand
Generates a random number between [min, max)
.
Parameters
Name | Type | Default | Description |
---|---|---|---|
max | number | 32768 | The maximum number. |
min | number | 0 | The minimum number. |
Returns: number
faker.mersenne.rand(max: number = 32768, min: number = 0): number
faker.mersenne.rand() // => 17983
faker.mersenne.rand() // 15515
faker.mersenne.rand(500, 1000) // 578
Seed
Sets the seed to use.
Parameters
Name | Type | Default | Description |
---|---|---|---|
S | number | The seed to use. |
Returns: void
faker.mersenne.seed(S: number): void
Seed_array
Sets the seed to use.
Parameters
Name | Type | Default | Description |
---|---|---|---|
A | number[] | The seed to use. |
Returns: void
faker.mersenne.seed_array(A: number[]): void