void printFunction(Fraction<Complex<int>> _fraction) { int a = _fraction.Numerator().Real(); int b = _fraction.Numerator().Imaginary(); int c = _fraction.Denominator().Real(); int d = _fraction.Denominator().Imaginary(); cout << "(" << a << SIGN(b) << b << "i)" << " / (" << c << SIGN(d) << d << "i)"; }
Fraction Fraction::operator / (const Fraction& rhs) const { int newNumerator = Numerator() * rhs.DenominatorAsInt(); int newDenominator = DenominatorAsInt() * rhs.Numerator(); return Fraction(0, newNumerator, newDenominator); }