src/main/java/de/javagl/geom/Points.java
/**
     * Computes the sum the given points and stores the
     * result in the given result point. If the given result point 
     * is <code>null</code>, a new point will be created and returned.
     * 
     * @param p0 The first point
     * @param p1 The second point
     * @param result The result
     * @return The result
     */
Computes the sum the given points and stores the
result in the given result point. If the given result point
is null, a new point will be created and returned.

@param p0 The first point
@param p1 The second point
@param result The result
@return The result
Computes the sum the given points and stores the result in the given result point . If the given result point is null a new point will be created and returned . @param p0 The first point @param p1 The second point @param result The result @return The result
public static Point2D add(Point2D p0, Point2D p1, Point2D result)
    {
        if (result == null)
        {
            result = new Point2D.Double();
        }
        result.setLocation(p0.getX()+p1.getX(), p0.getY()+p1.getY());
        return result;
    }
public static Point2D add ( Point2D p0 , Point2D p1 , Point2D result ) { if ( result == null ) { result = new Point2D . Double ( ) ; } result . setLocation ( p0 . getX ( ) + p1 . getX ( ) , p0 . getY ( ) + p1 . getY ( ) ) ; return result ; }
Computes the sum the given points and stores the
 result in the given result point.
Computes the sum the given points and stores the result in the given result point .