writeDoubleLe

fun ByteArray.writeDoubleLe(offset: Int, value: Double)

Writes a 64-bit IEEE 754 double in little-endian order starting at offset.

The value is converted with Double.toRawBits, which preserves the exact bit pattern including NaN payloads, and stored as with writeLongLe. The array is modified in place.

Parameters

offset

the index of the first byte to write.

value

the value to encode.

Throws

if offset is negative or offset + 8 exceeds the array size.