26 AFraction(
int numerator,
int denominator) : mNumerator(numerator), mDenominator(denominator) {}
27 AFraction(
int number): mNumerator(number), mDenominator(1) {}
30 mNumerator += number * mDenominator;
41 mNumerator -= number * mDenominator;
63 mDenominator *= number;
75 return mNumerator / mDenominator;
79 float toFloat()
const {
80 return float(mNumerator) / float(mDenominator);
83 double toDouble()
const {
84 return double(mNumerator) / double(mDenominator);
Definition: AFraction.h:20