You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Ahh, yes - it's a bit annoying. The easiest way is to use the Typed Arrays... So:

    var a = new Uint8Array(8); // 8 bytes
    a.buffer // an 'untyped' buffer
    new Int32Array(a.buffer); // a 2 element, int array
    new Float32Array(a.buffer); // 2 element floating point array
    new Float64Array(a.buffer); // 1 element float array
    

    and so on... each of those arrays will act on the same data. You can also supply lengths and offsets

About

Avatar for Gordon @Gordon started