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

Defined in: [packages/common/src/Random.ts:34](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Random.ts#L34)

A simple wrapper around Math.random().

For more complex needs check [RandomLibDep](https://evolu.dev/docs/api-reference/common/Random/interfaces/RandomLibDep).

### Example

```ts
// For apps
const random = createRandom();
random.next();

// For tests
const random = createRandomWithSeed("test");
random.next();
```

## Properties

<a id="next"></a>

### next

```ts
next: () => RandomNumber;
```

Defined in: [packages/common/src/Random.ts:36](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Random.ts#L36)

Returns a floating point number in [0, 1). Just like Math.random().