getFloat32 method
Reads 4-bytes
as a floating point
value.
The offset
must satisy the relations 0
≤ offset
≤ offset+4
≤ this.length
.
final Buffer buffer = Buffer.fromList([251, 33, 9, 64]);
final double value = buffer.getFloat32(0);
print(value); // 2.1426990032196045
Implementation
double getFloat32(final int offset, [final Endian endian = Endian.little]) {
return asByteData().getFloat32(offset, endian);
}