Adds this complex number to another. @param z The number to be added. @return The sum.
(Complex z)
| 72 | * @return The sum. |
| 73 | */ |
| 74 | public Complex add(Complex z) { |
| 75 | Complex temp = new Complex(); |
| 76 | temp.real = this.real + z.real; |
| 77 | temp.img = this.img + z.img; |
| 78 | return temp; |
| 79 | } |
| 80 | |
| 81 | /** |
| 82 | * Subtracts a number from this complex number. |
no outgoing calls