• Convert 3 8 bit Numbers into a single unsigned 24 bit Number.

    Parameters

    • r: number

      A single byte (0-255).

    • g: number

      A single byte (0-255).

    • b: number

      A single byte (0-255).

    Returns number

    A single unsigned 24 bit Number.

    // Set result1 to 0x112233 from an array of 3 values
    const result1 = pc.math.bytesToInt24([0x11, 0x22, 0x33]);

    // Set result2 to 0x112233 from 3 discrete values
    const result2 = pc.math.bytesToInt24(0x11, 0x22, 0x33);