buf.writeDoubleLE(value, offset[, noAssert])
Writes value
to the Buffer at the specified offset
with specified endian format (writeDoubleBE()
writes big endian, writeDoubleLE()
writes little endian). The value
argument should be a valid 64-bit double. Behavior is not defined when value
is anything other than a 64-bit double.
Set noAssert
to true to skip validation of value
and offset
. This means that value
may be too large for the specific function and offset
may be beyond the end of the Buffer leading to the values being silently dropped. This should not be used unless you are certain of correctness.
Example:
const buf = Buffer.allocUnsafe(8); buf.writeDoubleBE(0xdeadbeefcafebabe, 0); console.log(buf); // Prints: <Buffer 43 eb d5 b7 dd f9 5f d7> buf.writeDoubleLE(0xdeadbeefcafebabe, 0); console.log(buf); // Prints: <Buffer d7 5f f9 dd b7 d5 eb 43>
Please login to continue.