More nit-picks.
Project: http://git-wip-us.apache.org/repos/asf/commons-numbers/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-numbers/commit/7da7fa97 Tree: http://git-wip-us.apache.org/repos/asf/commons-numbers/tree/7da7fa97 Diff: http://git-wip-us.apache.org/repos/asf/commons-numbers/diff/7da7fa97 Branch: refs/heads/feature__NUMBERS-51__field Commit: 7da7fa9711ec6cf25903c045fb0eeb5267971f8d Parents: 21d5060 Author: Gilles Sadowski <gil...@harfang.homelinux.org> Authored: Thu Feb 1 12:52:50 2018 +0100 Committer: Gilles Sadowski <gil...@harfang.homelinux.org> Committed: Thu Feb 1 12:52:50 2018 +0100 ---------------------------------------------------------------------- .../java/org/apache/commons/numbers/complex/Complex.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/7da7fa97/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 c0561ad..b45093d 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 @@ -573,7 +573,7 @@ public class Complex implements Serializable { public Complex multiply(Complex factor) { checkNotNull(factor); return new Complex(real * factor.real - imaginary * factor.imaginary, - real * factor.imaginary + imaginary * factor.real); + real * factor.imaginary + imaginary * factor.real); } /** @@ -759,15 +759,15 @@ public class Complex implements Serializable { } else if (neitherInfiniteNorZeroNorNaN(real) && imaginary == 0) { return new Complex(Double.POSITIVE_INFINITY, 0); } else if (neitherInfiniteNorZeroNorNaN(real) && imaginary == Double.POSITIVE_INFINITY) { - return new Complex(0, Math.PI*0.5); + return new Complex(0, Math.PI * 0.5); } else if (real == Double.POSITIVE_INFINITY && neitherInfiniteNorZeroNorNaN(imaginary)) { - return new Complex(0, Math.PI*0.5); + return new Complex(0, Math.PI * 0.5); } else if (real == Double.POSITIVE_INFINITY && imaginary == Double.POSITIVE_INFINITY) { - return new Complex(0, Math.PI*0.5); + return new Complex(0, Math.PI * 0.5); } else if (real == Double.POSITIVE_INFINITY && Double.isNaN(imaginary)) { return new Complex(0, Double.NaN); } else if (Double.isNaN(real) && imaginary == Double.POSITIVE_INFINITY) { - return new Complex(0, Math.PI*0.5); + return new Complex(0, Math.PI * 0.5); } return this.add(Complex.ONE).divide(Complex.ONE.subtract(this)).log().divide(new Complex(2)); }