Mirror Engine
V5
How To
Mirror Engine Logo

Mirror Engine API


Mirror Engine API / math / intToBytes24

Function: intToBytes24()

function intToBytes24(i: number): number[]

Convert an 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

// Set bytes to [0x11, 0x22, 0x33]
const bytes = math.intToBytes24(0x112233)
Mirror Engine Logo