From 8143fe3b638b5a6b60ee717d98046856a2d2f547 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Wed, 10 Jul 2013 09:30:37 -0700 Subject: vecmath: introduce hash mixing helpers rather than a different float/double to bits helper Signed-off-by: Harvey Harrison --- src/javax/vecmath/GVector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/javax/vecmath/GVector.java') 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); } -- cgit v1.2.3