numBytes property

int get numBytes

Determine the number of bytes required to represent a value in this format.

Implementation

int get numBytes {
  switch (this) {
    case FloatLength.bytes64:
      return NumBytes.eight;
    case FloatLength.bytes32:
      return NumBytes.four;
    default:
      return NumBytes.two;
  }
}