Skip to content
Snippets Groups Projects
Commit aed0ff37 authored by BEROUD Benjamin's avatar BEROUD Benjamin
Browse files

Public Complex subtract (Complex subtrahend)

parent 91b06391
Branches
No related tags found
No related merge requests found
Pipeline #7777 failed
...@@ -126,7 +126,7 @@ public class Complex { ...@@ -126,7 +126,7 @@ public class Complex {
* @return the complex number {@code (this - subtrahend)} * @return the complex number {@code (this - subtrahend)}
*/ */
public Complex subtract(Complex subtrahend) { public Complex subtract(Complex subtrahend) {
return new Complex(this.imaginary - subtrahend.imaginary, this.real - subtrahend.real); return new Complex(this.real - subtrahend.real, this.imaginary - subtrahend.imaginary);
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment