setFloat32 abstract method
void setFloat32(Sets the four bytes starting at the specified byteOffset
in this object to the IEEE 754 single-precision binary floating-point (binary32) representation of the specified value
.
Note that this method can lose precision. The input value
is a 64-bit floating point value, which will be converted to 32-bit floating point value by IEEE 754 rounding rules before it is stored. If value
cannot be represented exactly as a binary32, it will be converted to the nearest binary32 value. If two binary32 values are equally close, the one whose least significant bit is zero will be used. Note that finite (but large) values can be converted to infinity, and small non-zero values can be converted to zero.
Throws RangeError if byteOffset
is negative, or byteOffset + 4
is greater than the length of this object.
Source
void setFloat32(int byteOffset, double value, [Endianness endian = Endianness.BIG_ENDIAN]);
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-typed_data/ByteData/setFloat32.html