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:11 UTC
[16/50] commons-numbers git commit: NUMBERS-55: Fixed "hashCode".
NUMBERS-55: Fixed "hashCode".
Project: http://git-wip-us.apache.org/repos/asf/commons-numbers/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-numbers/commit/b2d22678
Tree: http://git-wip-us.apache.org/repos/asf/commons-numbers/tree/b2d22678
Diff: http://git-wip-us.apache.org/repos/asf/commons-numbers/diff/b2d22678
Branch: refs/heads/feature__NUMBERS-51__field
Commit: b2d226785278777545ed72b1c55146ea5de5b4b8
Parents: 6caed74
Author: Gilles Sadowski <gi...@harfang.homelinux.org>
Authored: Tue Jan 30 15:34:06 2018 +0100
Committer: Gilles Sadowski <gi...@harfang.homelinux.org>
Committed: Tue Jan 30 15:34:06 2018 +0100
----------------------------------------------------------------------
.../src/main/java/org/apache/commons/numbers/complex/Complex.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/b2d22678/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 ac08732..281822b 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
@@ -486,8 +486,7 @@ public class Complex implements Serializable {
if (Double.isNaN(real) || Double.isNaN(imaginary)) {
return 7;
}
- return 37 * 17 * (hash(imaginary) +
- hash(real));
+ return 37 * (17 * hash(imaginary) + hash(real));
}
private int hash(double d) {