Constructor
new SeededRandom(seed, integer)
Create a new randomizer with a seed to extract values from.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
seed | number | Integer to use as seed, defaults to current time in milliseconds. | |
integer | boolean | false | Whether to return integers or floats. |
Methods
value(low, high, integer) → {number}
Get a random value.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
low | number | 0 | The lowest value to return (inclusive). |
high | number | 1 | The highest value to return (exclusive), if 'integer' is true, this will default to the unsigned 32-bit integer max (4294967296). |
integer | boolean | this.integer | Whether to return integers or floats, defaults to the value set in the constructor. |
Returns:
- Type:
- number