diff options
author | Harvey Harrison <[email protected]> | 2013-07-10 09:30:37 -0700 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2013-07-10 09:30:37 -0700 |
commit | 8143fe3b638b5a6b60ee717d98046856a2d2f547 (patch) | |
tree | 5a395167d9203d3218b4622685ffad993b308230 /src/javax/vecmath/AxisAngle4f.java | |
parent | ae0eabff70c9b63eac241b9f30bd389356cfb220 (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/AxisAngle4f.java')
-rw-r--r-- | src/javax/vecmath/AxisAngle4f.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/javax/vecmath/AxisAngle4f.java b/src/javax/vecmath/AxisAngle4f.java index eb16fb4..5da30ab 100644 --- a/src/javax/vecmath/AxisAngle4f.java +++ b/src/javax/vecmath/AxisAngle4f.java @@ -520,11 +520,11 @@ public class AxisAngle4f implements java.io.Serializable, Cloneable { @Override public int hashCode() { long bits = 1L; - bits = 31L * bits + (long)VecMathUtil.floatToIntBits(x); - bits = 31L * bits + (long)VecMathUtil.floatToIntBits(y); - bits = 31L * bits + (long)VecMathUtil.floatToIntBits(z); - bits = 31L * bits + (long)VecMathUtil.floatToIntBits(angle); - return (int) (bits ^ (bits >> 32)); + bits = VecMathUtil.hashFloatBits(bits, x); + bits = VecMathUtil.hashFloatBits(bits, y); + bits = VecMathUtil.hashFloatBits(bits, z); + bits = VecMathUtil.hashFloatBits(bits, angle); + return VecMathUtil.hashFinish(bits); } /** |