| 87 | |
| 88 | |
| 89 | Complex Complex::operator / (const Complex &c) const |
| 90 | { |
| 91 | float f = 1.0/(c.re * c.re + c.im * c.im); |
| 92 | float r = (re * c.re + im * c.im) * f; |
| 93 | float i = (im * c.re - re * c.im) * f; |
| 94 | return Complex(r, i); |
| 95 | } |
| 96 | |
| 97 | |
| 98 | Complex& Complex::operator += (const Complex &c) |