MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / hashCode

Method hashCode

src/main/java/com/volmit/adapt/util/Tuple3d.java:328–334  ·  view source on GitHub ↗

Returns a hash code value based on the data values in this object. Two different Tuple3d objects with identical data values (i.e., Tuple3d.equals returns true) will return the same hash code value. Two objects with different data members may return the same hash value, although this is not likely.

()

Source from the content-addressed store, hash-verified

326 * @return the integer hash code value
327 */
328 public int hashCode() {
329 long bits = 1L;
330 bits = 31L * bits + VecMathUtil.doubleToLongBits(x);
331 bits = 31L * bits + VecMathUtil.doubleToLongBits(y);
332 bits = 31L * bits + VecMathUtil.doubleToLongBits(z);
333 return (int) (bits ^ (bits >> 32));
334 }
335
336
337 /**

Callers 1

idMethod · 0.45

Calls 1

doubleToLongBitsMethod · 0.95

Tested by

no test coverage detected