public Rectangular union(Rectangular other)
    {
        return new Rectangular(Math.min(x1, other.x1),
                               Math.min(y1, other.y1),
                               Math.max(x2, other.x2),
                               Math.max(y2, other.y2));
    }
public Rectangular union ( Rectangular other ) { return new Rectangular ( Math . min ( x1 , other . x1 ) , Math . min ( y1 , other . y1 ) , Math . max ( x2 , other . x2 ) , Math . max ( y2 , other . y2 ) ) ; }
Computes the union of this rectangle with another one.
@param other the other rectangle
@return the union rectangle