-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
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.
Metadata
Metadata
Assignees
Labels
No labels