Esempio n. 1
0
	Rational Rational::operator-=(const Rational& rationalObj) {
		// make copy of the rational object
		Rational tmp = Rational(rationalObj);

		// negate
		tmp = tmp.negate();

		// add
		return *this += tmp;
	}
Esempio n. 2
0
	constexpr Rational subtract(const Rational& rhs) const {
		return add(rhs.negate());
	}