compareTo method

  1. @override
int compareTo(
  1. Fixed other
)
override

Two Fixed instances are the same if they have the same value and the same scale.

Implementation

@override
int compareTo(Fixed other) {
  if (value == other.value) {
    return scale.compareTo(other.scale);
  } else {
    return value.compareTo(other.value);
  }
}