aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample/complex.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libsample/complex.h')
-rw-r--r--tests/libsample/complex.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/libsample/complex.h b/tests/libsample/complex.h
new file mode 100644
index 000000000..f8efb790c
--- /dev/null
+++ b/tests/libsample/complex.h
@@ -0,0 +1,25 @@
+#ifndef COMPLEX_H
+#define COMPLEX_H
+
+class Complex
+{
+public:
+ Complex(double real = 0.0, double imag = 0.0);
+ ~Complex() {}
+
+ double real() const { return m_real; }
+ void setReal(double real) { m_real = real; }
+ double imag() const { return m_imag; }
+ void setImaginary(double imag) { m_imag = imag; }
+
+ Complex operator+(Complex& other);
+
+ void show();
+
+private:
+ double m_real;
+ double m_imag;
+};
+
+#endif // COMPLEX_H
+