MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / writeFloat

Method writeFloat

projects/JavaScript/proto/fbe.js:1027–1033  ·  view source on GitHub ↗

* Write float value into the field model buffer * @this {!FieldModelBase} * @param {!number} offset Offset * @param {!number} value Float value

(offset, value)

Source from the content-addressed store, hash-verified

1025 * @param {!number} value Float value
1026 */
1027 writeFloat (offset, value) {
1028 value = +value
1029 offset = offset >>> 0
1030 offset += this._buffer.offset
1031 this._buffer.checkValue(offset, 4, value, -3.4028234663852886e+38, 3.4028234663852886e+38)
1032 ieee754write(this._buffer.buffer, offset, value, true, 23, 4)
1033 }
1034
1035 /**
1036 * Write double value into the field model buffer

Callers 2

setMethod · 0.80
setMethod · 0.80

Calls 2

ieee754writeFunction · 0.85
checkValueMethod · 0.45

Tested by

no test coverage detected