Javascript Float64Array Type

Introduction

A Float64Array object describes an array-like view of an underlying binary data buffer.

The constructors are listed as follows:

new Float64Array();
new Float64Array(length);
new Float64Array(typedArray);
new Float64Array(object);
new Float64Array(buffer [, byteOffset [, length]]);
Parameter Optional Meaning
length Requiredan internal array buffer is created of size length multiplied by BYTES_PER_ELEMENT bytes.
typedArrayRequiredthe typedArray is copied into a new typed array.
object Requireduse the Float64Array.from() method.
buffer Required create from buffer
byteOffset optional offset to start
length optionallength to copy

Property access

You can reference elements in the array using standard array index syntax.

var int16 = new Float64Array(2);
int16[0] = 42;/* w  w  w .  j a v a 2 s .  c  o m*/
console.log(int16[0]); // 42
Type Value Range Size in bytes DescriptionEquivalent C type
Float64Array -2^63 to 2^63-18 64-bit two's complement signed integer int64_t (signed long long)



PreviousNext

Related