[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › Random

Random number generation.

## Core

| Name                                                                               | Description                                                                                                  |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [Random](https://evolu.dev/docs/api-reference/common/Random/interfaces/Random)                  | A simple wrapper around Math.random().                                                                       |
| [RandomDep](https://evolu.dev/docs/api-reference/common/Random/interfaces/RandomDep)            | Dependency wrapper for [Random](https://evolu.dev/docs/api-reference/common/Random/interfaces/Random).                    |
| [RandomLibDep](https://evolu.dev/docs/api-reference/common/Random/interfaces/RandomLibDep)      | Seedable random number generator supporting many common distributions, provided by the NPM `random` package. |
| [RandomNumber](https://evolu.dev/docs/api-reference/common/Random/type-aliases/RandomNumber)    | A random floating point number in [0, 1).                                                                    |
| [createRandom](https://evolu.dev/docs/api-reference/common/Random/functions/createRandom)       | Creates a [Random](https://evolu.dev/docs/api-reference/common/Random/interfaces/Random) using Math.random().             |
| [createRandomLib](https://evolu.dev/docs/api-reference/common/Random/functions/createRandomLib) | Creates a random number generator from the NPM `random` package.                                             |

## Testing

| Function                                                                                   | Description                                                                                                 |
| ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| [testCreateRandom](https://evolu.dev/docs/api-reference/common/Random/functions/testCreateRandom)       | Creates a seeded [Random](https://evolu.dev/docs/api-reference/common/Random/interfaces/Random) for deterministic tests. |
| [testCreateRandomLib](https://evolu.dev/docs/api-reference/common/Random/functions/testCreateRandomLib) | Creates a seeded random number generator from the NPM `random` package for deterministic tests.             |