Add more construectors

main
Micke Nordin 2 years ago
parent 1b4a1d5d61
commit 909c52ecfd
Signed by: micke
GPG Key ID: 014B273D614BE877

@ -22,14 +22,26 @@ public:
r = a; r = a;
i = b; i = b;
} }
cnumber(const fraction &a) {
r = a;
i = 0;
}
cnumber(int a, int b) { cnumber(int a, int b) {
r = a; r = a;
i = b; i = b;
} }
cnumber(int a) {
r = a;
i = 0;
}
cnumber(double a, double b) { cnumber(double a, double b) {
r = a; r = a;
i = b; i = b;
} }
cnumber(double a) {
r = a;
i = 0;
}
~cnumber() {} ~cnumber() {}
// Member functions // Member functions
cnumber conjugate() const { cnumber conjugate() const {

Loading…
Cancel
Save