# math.intToBytes24

Function · category: Math

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

```ts
intToBytes24(i: number): number[]
```

Convert a 24-bit integer into an array of 3 bytes.

**Parameters**

- `i` (`number`): Number holding an integer value.

**Returns** `number[]`: An array of 3 bytes.

**Example**

```ts
// Set bytes to [0x11, 0x22, 0x33]
const bytes = math.intToBytes24(0x112233);
```
