public float dot(Vector3f vec) {
        if (null == vec) {
            logger.warning("Provided vector is null, 0 returned.");
            return 0;
        }
        return x * vec.x + y * vec.y + z * vec.z;
    }
Returns the dot (or inner) product with the argument. If the argument is
null, 0 is returned. Either way, the current instance is unaffected.

@param vec the vector to multiply (unaffected) or null for none
@return the product or 0
jme3-core/src/main/java/com/jme3/math/Vector3f.java