code: func IntersectArea(r1 Rect, r2 Rect) int {
  	x1, y1, w1, h1 := RectPieces(r1)
  	x2, y2, w2, h2 := RectPieces(r2)
  	if x2 < x1+w1 && x2+w2 > x1 && y2 < y1+h1 && y2+h2 > y1 {
  		iw := min(x1+w1-1, x2+w2-1) - max(x1, x2) + 1
  		ih := min(y1+h1-1, y2+h2-1) - max(y1, y2) + 1
  		return iw * ih
  	}
  
  	return 0
  }
docs: // IntersectArea takes two rectangles satisfying the Rect interface and
  // returns the area of their intersection. If there is no intersection, return
  // 0 area.