Multiplies this complex number by another. @param z The number to be multiplied. @return The product.
(Complex z)
| 98 | * @return The product. |
| 99 | */ |
| 100 | public Complex multiply(Complex z) { |
| 101 | Complex temp = new Complex(); |
| 102 | temp.real = this.real * z.real - this.img * z.img; |
| 103 | temp.img = this.real * z.img + this.img * z.real; |
| 104 | return temp; |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * Multiplies this complex number by a scalar. |
no outgoing calls