setFloatAt method
Write float with specified endianness
offset: The offset to write tobytes: The number of bytes to writevalue: The float value to writeendian: The endianness to use
Implementation
void setFloatAt(int offset, int bytes, double value, StructEndian endian) {
switch (bytes) {
case 4:
setFloat32(offset, value, endian.toEndian());
break;
case 8:
setFloat64(offset, value, endian.toEndian());
break;
default:
throw ArgumentError('Unsupported float size: $bytes bytes');
}
}