Float64Array Object
A typed array of 64-bit float values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised.
float64Array = new Float64Array( length ); float64Array = new Float64Array( array ); float64Array = new Float64Array( buffer, byteOffset, length);
The following table lists the constants of the Float64Arrayobject.
|
Property |
Description |
|---|---|
|
Read-only. Gets the ArrayBuffer that is referenced by this array. |
|
|
Read-only. The length of this array from the start of its ArrayBuffer, in bytes, as fixed at construction time. |
|
|
Read-only. The offset of this array from the start of its ArrayBuffer, in bytes, as fixed at construction time. |
|
|
The length of the array. |
The following example shows how to use a Float64Array object to process the binary data acquired from an XmlHttpRequest:
var req = new XMLHttpRequest(); req.open('GET', "http://www.example.com"); req.responseType = "arraybuffer"; req.send(); req.onreadystatechange = function () { if (req.readyState === 4) { var buffer = req.response; var dataview = new DataView(buffer); var ints = new Float64Array(buffer.byteLength / 8); for (var i = 0; i < ints.length; i++) { ints[i] = dataview.getFloat64(i * 8); } alert(ints[10]); } }
Supported in the Internet Explorer 10 standards document mode. Also supported in Windows Store apps. See Version Information.
Not supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards.