summaryrefslogtreecommitdiffstats
path: root/src/javax/vecmath/GVector.java
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-07-10 09:30:37 -0700
committerHarvey Harrison <[email protected]>2013-07-10 09:30:37 -0700
commit8143fe3b638b5a6b60ee717d98046856a2d2f547 (patch)
tree5a395167d9203d3218b4622685ffad993b308230 /src/javax/vecmath/GVector.java
parentae0eabff70c9b63eac241b9f30bd389356cfb220 (diff)
vecmath: introduce hash mixing helpers rather than a different float/double to bits helper
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/javax/vecmath/GVector.java')
-rw-r--r--src/javax/vecmath/GVector.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/javax/vecmath/GVector.java b/src/javax/vecmath/GVector.java
index f28db87..9cd1412 100644
--- a/src/javax/vecmath/GVector.java
+++ b/src/javax/vecmath/GVector.java
@@ -663,10 +663,10 @@ public class GVector implements java.io.Serializable, Cloneable {
long bits = 1L;
for (int i = 0; i < length; i++) {
- bits = 31L * bits + VecMathUtil.doubleToLongBits(values[i]);
+ bits = VecMathUtil.hashDoubleBits(bits, values[i]);
}
- return (int) (bits ^ (bits >> 32));
+ return VecMathUtil.hashFinish(bits);
}