operator == method
Equal to
Implementation
@override
operator ==(Object other) {
Rational? rational = null;
if (other is Decimal) {
rational = other.toRational();
} else if (other is Rational) {
rational = other;
} else {
return false;
}
return this.compareTo(rational) == 0;
}