UNPKG

aes70

Version:

A controller library for the AES70 protocol.

16 lines (14 loc) 373 B
import { createType } from './createType.js'; export const OcaFloat32 = createType({ isConstantLength: true, encodedLength: function (value) { return 4; }, encodeTo: function (dataView, pos, value) { dataView.setFloat32(pos, +value, false); return pos + 4; }, decode: function (dataView, pos) { return dataView.getFloat32(pos, false); }, });