public Vector2f add(Vector2f vec, Vector2f result) {
        if (null == vec) {
            logger.warning("Provided vector is null, null returned.");
            return null;
        }
        if (result == null) {
            result = new Vector2f();
        }
        result.x = x + vec.x;
        result.y = y + vec.y;
        return result;
    }
Adds a specified vector and returns the sum in a 3rd vector. If the
argument is null, null is returned. Either way, the current instance is
unaffected unless it's {@code result}.

@param vec the vector to add (unaffected unless it's {@code result}) or
    null for none
@param result storage for the sum, or null for a new Vector2f
@return the sum (either {@code result} or a new Vector2f)
jme3-core/src/main/java/com/jme3/math/Vector2f.java