aboutsummaryrefslogtreecommitdiff
path: root/common/rational.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/rational.cpp')
-rw-r--r--common/rational.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/rational.cpp b/common/rational.cpp
index 90e44576a7..84c1e4bee0 100644
--- a/common/rational.cpp
+++ b/common/rational.cpp
@@ -51,6 +51,11 @@ Rational::Rational(int num, int denom) {
cancel();
}
+Rational::Rational(const Rational &rational) {
+ _num = rational._num;
+ _denom = rational._denom;
+}
+
void Rational::cancel() {
// Cancel the fraction by dividing both the num and the denom
// by their greatest common divisor.