Created
September 20, 2012 18:14
-
-
Save incompl/3757489 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var char = new Int8Array( 1 ); | |
// uchar now shares the same ArrayBuffer as char. | |
var uchar = new Uint8Array( char.buffer ); | |
char.buffer === uchar.buffer; // true | |
char[0] = -1; | |
uchar[0] === 255; // true, same data interpreted differently | |
var arr = new Float64Array([15.290663048624992]); | |
// { '0': 15.290663048624992, | |
// buffer: | |
// { '0': 0, | |
// '1': 0, | |
// '2': 128, | |
// '3': 201, | |
// '4': 209, | |
// '5': 148, | |
// '6': 46, | |
// '7': 64, | |
// byteLength: 8 }, | |
// BYTES_PER_ELEMENT: 8, | |
// length: 1, | |
// set: [Function: set], | |
// slice: [Function: slice], | |
// byteOffset: 0, | |
// byteLength: 8, | |
// subarray: [Function: subarray] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment