public Quaternion inverse() {
        float norm = norm();
        if (norm > 0.0) {
            float invNorm = 1.0f / norm;
            return new Quaternion(-x * invNorm, -y * invNorm, -z * invNorm, w
                    * invNorm);
        }
        // return an invalid result to flag the error
        return null;
    }
Returns the multiplicative inverse. For a quaternion with norm=0, null is
returned. Either way, the current instance is unaffected.

@return a new Quaternion or null
jme3-core/src/main/java/com/jme3/math/Quaternion.java