
package.lib.DataView.cjs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of float16 Show documentation
Show all versions of float16 Show documentation
IEEE 754 half-precision floating-point for JavaScript
The newest version!
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getFloat16 = getFloat16;
exports.setFloat16 = setFloat16;
var _arrayIterator = require("./_util/arrayIterator.cjs");
var _converter = require("./_util/converter.cjs");
var _primordials = require("./_util/primordials.cjs");
function getFloat16(dataView, byteOffset, ...opts) {
return (0, _converter.convertToNumber)((0, _primordials.DataViewPrototypeGetUint16)(dataView, byteOffset, ...(0, _arrayIterator.safeIfNeeded)(opts)));
}
function setFloat16(dataView, byteOffset, value, ...opts) {
return (0, _primordials.DataViewPrototypeSetUint16)(dataView, byteOffset, (0, _converter.roundToFloat16Bits)(value), ...(0, _arrayIterator.safeIfNeeded)(opts));
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy