The getFloat32()
method gets a signed 32-bit float (float) at the specified byte offset from the start of the DataView
.
dataview.getFloat32(byteOffset [, littleEndian])
byteOffset
littleEndian
false
or undefined
, a big-endian value is read.A signed 32-bit float number.
RangeError
byteOffset
is set such as it would read beyond the end of the view.There is no alignment constraint; multi-byte values may be fetched from any offset.
var buffer = new ArrayBuffer(8); var dataview = new DataView(buffer); dataview.getFloat32(1); // 0
Specification |
---|
ECMAScript (ECMA-262) The definition of 'DataView.prototype.getFloat32' in that specification. |
Desktop | ||||||
---|---|---|---|---|---|---|
getFloat32 |
9 | 12 | 15 | 10 | 12.1 | 5.1 |
Mobile | ||||||
---|---|---|---|---|---|---|
getFloat32 |
4 | 18 | 15 | 12.1 | 4.2 | 1.0 |
Server | |
---|---|
getFloat32 |
0.10 |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getFloat32