title: getting the area of two intersecting rectangles
body: <p>i'm sincerely confusing myself here... which one actually returns the area of intersection between two rectangles? pleas explain (math frustrates me). any help would be appreciated.</p>
  
  <p><strong>APPROACH ONE:</strong> </p>
  
  <pre><code>double newX = Math.max(this.x, rect2.x);
  double newY = Math.max(this.y, rect2.y);
  return new Rect(newX, newY, Math.min(this.x + this.width, rect2.x + rect2.width) - newX, Math.min(this.y
          + this.height, rect2.y + rect2.height)
          - newY);
  </code></pre>
  
  <p><strong>APPROACH TWO:</strong>           </p>
  
  <pre><code>double areaOfIntersection = Math.max(0, Math.max(rect1x2, rect2x2) - Math.min(rect1x1, rect2x1))
                          * Math.max(0, Math.max(rect1y2, rect2y2) - Math.min(rect1y1, rect2y1)); 
  </code></pre>