Rational Rational::operator-=(const Rational& rationalObj) { // make copy of the rational object Rational tmp = Rational(rationalObj); // negate tmp = tmp.negate(); // add return *this += tmp; }
constexpr Rational subtract(const Rational& rhs) const { return add(rhs.negate()); }