| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/DataView/setFloat32 | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.
DataView setFloat32() DataView 4 32 . , .
// Create an ArrayBuffer with a size in bytes
const buffer = new ArrayBuffer(16);
const view = new DataView(buffer);
view.setFloat32(1, Math.PI);
console.log(view.getFloat32(1));
// Expected output: 3.1415927410125732
setFloat32(byteOffset, value)
setFloat32(byteOffset, value, littleEndian)
RangeError byteOffset .
const buffer = new ArrayBuffer(10);
const dataview = new DataView(buffer);
dataview.setFloat32(0, 3);
dataview.getFloat32(1); // 2
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-dataview.prototype.setfloat32 |
This page was last modified on 2025 2 11 by MDN contributors.
DataViewDataView.prototype.getBigInt64()DataView.prototype.getBigUint64()DataView.prototype.getFloat16()DataView.prototype.getFloat32()DataView.prototype.getFloat64()DataView.prototype.getInt8()DataView.prototype.getInt16()DataView.prototype.getInt32()DataView.prototype.getUint8()DataView.prototype.getUint16()DataView.prototype.getUint32()DataView.prototype.setBigInt64()DataView.prototype.setBigUint64()DataView.prototype.setFloat16()DataView.prototype.setFloat32()DataView.prototype.setFloat64()DataView.prototype.setInt8()DataView.prototype.setInt16()DataView.prototype.setInt32()DataView.prototype.setUint8()DataView.prototype.setUint16()DataView.prototype.setUint32()Object/FunctionObject.prototype.__defineGetter__()Object.prototype.__defineSetter__()Object.prototype.__lookupGetter__()Object.prototype.__lookupSetter__()Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |