MCPcopy
hub / github.com/stemkoski/stemkoski.github.com / _readFloat

Function _readFloat

MathBox/mathbox-core.js:1571–1578  ·  view source on GitHub ↗
(buf, offset, littleEndian, noAssert)

Source from the content-addressed store, hash-verified

1569}
1570
1571function _readFloat (buf, offset, littleEndian, noAssert) {
1572 if (!noAssert) {
1573 assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
1574 assert(offset + 3 < buf.length, 'Trying to read beyond buffer length')
1575 }
1576
1577 return ieee754.read(buf, offset, littleEndian, 23, 4)
1578}
1579
1580Buffer.prototype.readFloatLE = function (offset, noAssert) {
1581 return _readFloat(this, offset, true, noAssert)

Callers 1

mathbox-core.jsFile · 0.70

Calls 1

assertFunction · 0.70

Tested by

no test coverage detected