aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libother/number.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libother/number.cpp')
-rw-r--r--tests/libother/number.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/libother/number.cpp b/tests/libother/number.cpp
index 132624a5b..e2d7a00b1 100644
--- a/tests/libother/number.cpp
+++ b/tests/libother/number.cpp
@@ -40,3 +40,14 @@ operator*(const Point& p, const Number& n)
return Point(p.x() * n.value(), p.y() * n.value());
}
+Complex
+Number::toComplex() const
+{
+ return Complex(m_value);
+}
+
+Number
+Number::fromComplex(Complex cpx)
+{
+ return Number(cpx.real());
+}