commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aherb...@apache.org
Subject [commons-numbers] branch master updated: Fix comments in multiply method.
Date Fri, 28 Feb 2020 17:46:48 GMT
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git


The following commit(s) were added to refs/heads/master by this push:
     new 817cb6d  Fix comments in multiply method.
817cb6d is described below

commit 817cb6d4c8ec6afdfed94e9d5e8bbd50e0b9f9db
Author: aherbert <aherbert@apache.org>
AuthorDate: Fri Feb 28 17:46:43 2020 +0000

    Fix comments in multiply method.
    
    Removed a spurious comment left-over from when multiply accepted another
    Complex named 'factor'.
---
 .../src/main/java/org/apache/commons/numbers/complex/Complex.java      | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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 559d7e8..37b42e3 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
@@ -984,10 +984,9 @@ public final class Complex implements Serializable  {
                 d = changeNaNtoZero(d);
                 recalc = true;
             }
-            // (c, d) may have been corrected so do not use factor.isInfinite().
             if ((Double.isInfinite(c) || Double.isInfinite(d)) &&
                 isNotZero(a, b)) {
-                // This other complex is infinite.
+                // The other complex is infinite.
                 // "Box" the infinity and change NaNs in the other factor to 0.
                 c = boxInfinity(c);
                 d = boxInfinity(d);


Mime
View raw message