readFloat method

double readFloat()

Reads and returns a 4-byte float, using the current endian setting.

Throws EOFException if EOF is reached before the needed bytes are read.

Implementation

double readFloat() {
  if (seek + 4 > _source.lengthInBytes) {
    throw EOFException('Attempt to read beyond end of input');
  } else {
    final result = _asByteData.getFloat32(seek, endian);
    seek += 4;
    return result;
  }
}