operator == method

  1. @override
bool operator ==(
  1. Object other
)
override

Two Rationals are equal iff they represent the same exact rational number.

Implementation

@override
bool operator ==(Object other) =>
    other is Rational &&
    _numerator * other._denominator == other._numerator * _denominator;