summaryrefslogtreecommitdiffstats
path: root/src/javax/vecmath/Tuple4d.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/javax/vecmath/Tuple4d.java')
-rw-r--r--src/javax/vecmath/Tuple4d.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/javax/vecmath/Tuple4d.java b/src/javax/vecmath/Tuple4d.java
index f06bf7d..d5269f0 100644
--- a/src/javax/vecmath/Tuple4d.java
+++ b/src/javax/vecmath/Tuple4d.java
@@ -452,11 +452,11 @@ public abstract class Tuple4d implements java.io.Serializable, Cloneable {
@Override
public int hashCode() {
long bits = 1L;
- bits = 31L * bits + VecMathUtil.doubleToLongBits(x);
- bits = 31L * bits + VecMathUtil.doubleToLongBits(y);
- bits = 31L * bits + VecMathUtil.doubleToLongBits(z);
- bits = 31L * bits + VecMathUtil.doubleToLongBits(w);
- return (int) (bits ^ (bits >> 32));
+ bits = VecMathUtil.hashDoubleBits(bits, x);
+ bits = VecMathUtil.hashDoubleBits(bits, y);
+ bits = VecMathUtil.hashDoubleBits(bits, z);
+ bits = VecMathUtil.hashDoubleBits(bits, w);
+ return VecMathUtil.hashFinish(bits);
}