writeFp64Array method
Writes an array of fp64 values (CORELIB_PLAN §4.8) — the first count of
values, all of them when omitted.
Implementation
void writeFp64Array(int id, List<double> values, [int? count]) {
_writeHeader(id, WireType.arrayFixlen);
final n = _countOf(count, values.length);
_writeVarint(n);
_writeVarint((8 << 3) | FixlenType.fp64);
var p = _pos;
if (p + n * 8 <= _buf.length) {
final bd = _bufData;
for (var k = 0; k < n; k++) {
bd.setFloat64(p, values[k], Endian.little);
p += 8;
}
_pos = p;
} else {
for (var k = 0; k < n; k++) {
_putFloat64(values[k]);
}
}
}