pxt-ev3/sim/state/util.ts
2017-12-18 13:04:17 -08:00

7 lines
197 B
TypeScript

namespace pxsim.util {
export function map16Bit(buffer: Uint8Array, index: number, value: number) {
buffer[index] = (value >> 8) & 0xff;
buffer[index+1] = value & 0xff;
}
}