readFloat32 method

double readFloat32(
  1. [Endian endian = Endian.big]
)

Reads a 32-bit floating-point value. Increments index by 4.

Implementation

double readFloat32([Endian endian = Endian.big]) {
  final byteData = this._byteData;
  final index = this.index;
  final newIndex = index + 4;
  if (newIndex > byteData.lengthInBytes) {
    throw _eofException(index, "float32");
  }
  final value = byteData.getFloat32(index, endian);
  this.index = newIndex;
  return value;
}