MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / subtract

Method subtract

src/main/java/com/thealgorithms/maths/FFT.java:87–92  ·  view source on GitHub ↗

Subtracts a number from this complex number. @param z The number to be subtracted. @return The difference.

(Complex z)

Source from the content-addressed store, hash-verified

85 * @return The difference.
86 */
87 public Complex subtract(Complex z) {
88 Complex temp = new Complex();
89 temp.real = this.real - z.real;
90 temp.img = this.img - z.img;
91 return temp;
92 }
93
94 /**
95 * Multiplies this complex number by another.

Callers 6

subtractTestMethod · 0.95
fftMethod · 0.95
calculateMethod · 0.45
karatsubaMethod · 0.45
isProbablePrimeMethod · 0.45
sylvesterMethod · 0.45

Calls

no outgoing calls

Tested by 1

subtractTestMethod · 0.76