/** * Get a hashCode for the 3D vector. * * <p>All NaN values have the same hash code. * * @return a hash code value for this object */ @Override public int hashCode() { if (isNaN()) { return 8; } return 31 * (23 * MathUtils.hash(x) + 19 * MathUtils.hash(y) + MathUtils.hash(z)); }
/** * Returns hash code based on getResult() and getN() * * @return hash code */ @Override public int hashCode() { return 31 * (31 + MathUtils.hash(getResult())) + MathUtils.hash(getN()); }