FloatUtils class

Constructors

FloatUtils(double value)

Properties

hashCode → int
The hash code for this object.
no setterinherited
isLessThan16 → bool
no setter
isLessThan32 → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → FloatLength
The smallest format value can be represented in without loss.
no setter
value → double
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBytes(FloatLength? decodFloatType, {Endian? endianness, bool allowFloat16 = true}) → (BuBytes, FloatLength)
Encodes value into bytes using decodFloatType, or (if null) the smallest format it fits without loss. Returns the encoded bytes together with the format actually used.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

floatFromBytes16(List<int> bytes) → double
Decodes a 16-bit float from bytes (big-endian) into a double.
isLessThan(double value, FloatLength type) → bool
Whether value fits in type without loss, without needing to construct a FloatUtils first.