# math.intToBytes32

Function · category: Math

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

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

Convert a 32-bit integer into an array of 4 bytes.

**Parameters**

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

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

**Example**

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