Ratio{numer:0, denom:1} is not equal to Ratio{numer:0, denom:2}
The code that appears to deal with this is
// With equal numerators, the denominators can be inversely compared
if self.numer == other.numer {
let ord = self.denom.cmp(&other.denom);
return if self.numer < T::zero() {
ord
} else {
ord.reverse()
};
}
It seems like we could easily add a case for self.numer == T::zero(), but this ties in with #8 and I don't see a need to rush a fix.
Ratio{numer:0, denom:1}is not equal toRatio{numer:0, denom:2}The code that appears to deal with this is
It seems like we could easily add a case for
self.numer == T::zero(), but this ties in with #8 and I don't see a need to rush a fix.