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

Aucun changement, ajout commentaire

parent aed0ff37
No related branches found
No related tags found
No related merge requests found
Pipeline #7780 failed
...@@ -147,8 +147,11 @@ public class Complex { ...@@ -147,8 +147,11 @@ public class Complex {
* @return <code>||this|| ** 2</code> * @return <code>||this|| ** 2</code>
*/ */
public double squaredModulus() { public double squaredModulus() {
return real * real + imaginary * imaginary; return this.real * this.real + this.imaginary * this.imaginary;
} }
// return this.real * this.real + this.imaginary * this.imaginary;
// return this.real * 2 + this.imaginary * 2;
// return
/** /**
* Returns the modulus (distance to zero) of this complex number. * Returns the modulus (distance to zero) of this complex number.
...@@ -158,6 +161,7 @@ public class Complex { ...@@ -158,6 +161,7 @@ public class Complex {
public double modulus() { public double modulus() {
return Math.sqrt(squaredModulus()); return Math.sqrt(squaredModulus());
} }
// return this.real + this.imaginary;
/** /**
...@@ -205,6 +209,12 @@ public class Complex { ...@@ -205,6 +209,12 @@ public class Complex {
result = result.multiply(this); result = result.multiply(this);
return result; return result;
} }
// if (p == 0) {
// return ZERO;}
// else {
// Complex result = (this.multiply(this)).pow(p / 2);
// return result;}
// aucune idée de ce qu'est integral power
/** /**
* Returns the scalar multiplication of this complex number. * Returns the scalar multiplication of this complex number.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment