API reference › @evolu/common › Random
Random number generation.
Functions
| Function | Description |
|---|---|
| createRandom | Creates a Random using Math.random(). |
| createRandomLib | Creates a random number generator from the NPM random package. |
| testCreateRandom | Creates a seeded Random for deterministic tests. |
| testCreateRandomLib | Creates a seeded random number generator from the NPM random package for deterministic tests. |
Interfaces
| Interface | Description |
|---|---|
| Random | A simple wrapper around Math.random(). |
| RandomDep | - |
| RandomLibDep | Seedable random number generator supporting many common distributions, provided by the NPM random package. |
Type Aliases
| Type Alias | Description |
|---|---|
| RandomNumber | A random floating point number in [0, 1). |