# math.random

Function · category: Math

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/core/math/math.js#L241

```ts
random(min: number, max: number): number
```

Return a pseudo-random number between min and max. The number generated is in the range
[min, max), that is inclusive of the minimum but exclusive of the maximum.

**Parameters**

- `min` (`number`): Lower bound for range.
- `max` (`number`): Upper bound for range.

**Returns** `number`: Pseudo-random number between the supplied range.

**Example**

```ts
math.random(0, 10); // returns a random number between 0 and 10
```
