return *(this) + (a * negOne);
}
- bool operator==(DeltaRational& other){
+ bool operator==(const DeltaRational& other) const{
return (k == other.k) && (c == other.c);
}
- bool operator<=(DeltaRational& other){
+ bool operator<=(const DeltaRational& other) const{
int cmp = c.cmp(other.c);
return (cmp < 0) || ((cmp==0)&&(k <= other.k));
}
- bool operator<(DeltaRational& other){
+ bool operator<(const DeltaRational& other) const{
return (other > *this);
}
- bool operator>=(DeltaRational& other){
+ bool operator>=(const DeltaRational& other) const{
return (other <= *this);
}
- bool operator>(DeltaRational& other){
+ bool operator>(const DeltaRational& other) const{
return !(*this <= other);
}