public static Quaternion slerpNoInvert(Quaternion q1, Quaternion q2, float t, Quaternion store) {
        float dot = q1.dot(q2);

        if (dot > -0.95f && dot < 0.95f) {
            float angle = FastMath.acos(dot);
            float sin1 = FastMath.sin(angle * (1 - t));
            float sin2 = FastMath.sin(angle * t);
            float sin3 = FastMath.sin(angle);
            store.x = (q1.x * sin1 + q2.x * sin2) / sin3;
            store.y = (q1.y * sin1 + q2.y * sin2) / sin3;
            store.z = (q1.z * sin1 + q2.z * sin2) / sin3;
            store.w = (q1.w * sin1 + q2.w * sin2) / sin3;
            System.err.println("real slerp");
        } else {
            // if the angle is small, use linear interpolation
            store.set(q1).nlerp(q2, t);
            System.err.println("nlerp");
        }
        return store;
    }
Calculate the exponential of a pure quaternion.

@param q the input Quaternion (not null, w=0, unaffected)
@param store storage for the result (not null, modified)
@return the exponential (store)
jme3-core/src/main/java/com/jme3/math/MathUtils.java