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