|
|
|
@ -10,6 +10,10 @@ private:
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
// Constructor
|
|
|
|
|
cnumber() {
|
|
|
|
|
r = 0;
|
|
|
|
|
i = 0;
|
|
|
|
|
}
|
|
|
|
|
cnumber(const cnumber &z) {
|
|
|
|
|
r = z.r;
|
|
|
|
|
i = z.i;
|
|
|
|
@ -26,6 +30,7 @@ public:
|
|
|
|
|
r = a;
|
|
|
|
|
i = b;
|
|
|
|
|
}
|
|
|
|
|
~cnumber() {}
|
|
|
|
|
// Member functions
|
|
|
|
|
cnumber conjugate() const {
|
|
|
|
|
fraction a(this->r.get_n(), this->r.get_d());
|
|
|
|
|