You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2018/02/02 13:29:40 UTC
[45/50] commons-numbers git commit: Visual clean-up (unnecessary
usage of "this").
Visual clean-up (unnecessary usage of "this").
Project: http://git-wip-us.apache.org/repos/asf/commons-numbers/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-numbers/commit/bcbfee1d
Tree: http://git-wip-us.apache.org/repos/asf/commons-numbers/tree/bcbfee1d
Diff: http://git-wip-us.apache.org/repos/asf/commons-numbers/diff/bcbfee1d
Branch: refs/heads/feature__NUMBERS-51__field
Commit: bcbfee1dc3026cf65e5c430bd01b0995e5e9da99
Parents: bc690a6
Author: Gilles Sadowski <gi...@harfang.homelinux.org>
Authored: Fri Feb 2 01:21:07 2018 +0100
Committer: Gilles Sadowski <gi...@harfang.homelinux.org>
Committed: Fri Feb 2 01:21:07 2018 +0100
----------------------------------------------------------------------
.../apache/commons/numbers/complex/Complex.java | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/bcbfee1d/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
----------------------------------------------------------------------
diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
index 19eb2fc..125a0b4 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
@@ -680,7 +680,7 @@ public class Complex implements Serializable {
imaginary == Double.POSITIVE_INFINITY) {
return new Complex(Double.NaN, Double.NEGATIVE_INFINITY);
}
- return this.add(this.sqrt1z().multiply(I)).log().multiply(I.negate());
+ return add(sqrt1z().multiply(I)).log().multiply(I.negate());
}
/**
* Compute the
@@ -692,7 +692,7 @@ public class Complex implements Serializable {
* @return the inverse sine of this complex number
*/
public Complex asin() {
- return sqrt1z().add(this.multiply(I)).log().multiply(I.negate());
+ return sqrt1z().add(multiply(I)).log().multiply(I.negate());
}
/**
* Compute the
@@ -705,8 +705,7 @@ public class Complex implements Serializable {
* @return the inverse tangent of this complex number
*/
public Complex atan() {
- return this.add(I).divide(I.subtract(this)).log()
- .multiply(I.multiply(0.5));
+ return add(I).divide(I.subtract(this)).log().multiply(I.multiply(0.5));
}
/**
@@ -775,7 +774,7 @@ public class Complex implements Serializable {
imaginary == Double.POSITIVE_INFINITY) {
return new Complex(0, Math.PI * 0.5);
}
- return this.add(ONE).divide(ONE.subtract(this)).log().multiply(0.5);
+ return add(ONE).divide(ONE.subtract(this)).log().multiply(0.5);
}
/**
* Compute the
@@ -796,8 +795,8 @@ public class Complex implements Serializable {
*
* @return square of this complex number
*/
- public Complex square(){
- return this.multiply(this);
+ public Complex square() {
+ return multiply(this);
}
/**
@@ -974,7 +973,7 @@ public class Complex implements Serializable {
return NaN;
}
}
- return this.log().multiply(x).exp();
+ return log().multiply(x).exp();
}
/**
@@ -995,7 +994,7 @@ public class Complex implements Serializable {
return NaN;
}
}
- return this.log().multiply(x).exp();
+ return log().multiply(x).exp();
}
/**
@@ -1118,7 +1117,7 @@ public class Complex implements Serializable {
* @return the square root of <code>1 - this<sup>2</sup></code>.
*/
public Complex sqrt1z() {
- return ONE.subtract(this.multiply(this)).sqrt();
+ return ONE.subtract(multiply(this)).sqrt();
}
/**