public boolean isSimilar(Quaternion other, float epsilon) {
        if (other == null) {
            return false;
        }
        if (Float.compare(Math.abs(other.x - x), epsilon) > 0) {
            return false;
        }
        if (Float.compare(Math.abs(other.y - y), epsilon) > 0) {
            return false;
        }
        if (Float.compare(Math.abs(other.z - z), epsilon) > 0) {
            return false;
        }
        if (Float.compare(Math.abs(other.w - w), epsilon) > 0) {
            return false;
        }
        return true;
    }
Tests for approximate equality with the specified quaternion, using the
specified tolerance. The current instance is unaffected.

<p>To quantify the similarity of 2 normalized quaternions, use
{@link #dot(com.jme3.math.Quaternion)}.

@param other the quaternion to compare (not null, unaffected)
@param epsilon the tolerance for each component
@return true if all 4 components are within tolerance, otherwise false
jme3-core/src/main/java/com/jme3/math/Quaternion.java