API reference@evolu/common › Random

Random number generation.

Functions

FunctionDescription
createRandomCreates a Random using Math.random().
createRandomLibCreates a random number generator from the NPM random package.
testCreateRandomCreates a seeded Random for deterministic tests.
testCreateRandomLibCreates a seeded random number generator from the NPM random package for deterministic tests.

Interfaces

InterfaceDescription
RandomA simple wrapper around Math.random().
RandomDep-
RandomLibDepSeedable random number generator supporting many common distributions, provided by the NPM random package.

Type Aliases

Type AliasDescription
RandomNumberA random floating point number in [0, 1).