#
WC 4.1 - Intersecting Area Of Overlapping Rectangles

You need to find the overlapping area of the two given rectangles. The section you need to output the area of would be the blue lined section shown in the image.

The sides are parallel to the coordinate axes.

If the two rectangles do not overlap, the resultant area should be 0.

__Input__

There will be two lines of input. On each line are the x and y positions (separated by a comma) of each opposing corner (each corner co-ordinate separated by a space).

The co-ordinates can have decimals, and can be negative.

__Output__

The area of the overlapping section of the two rectangles, including any decimal part.

__Sample Input__

0,0 2,2

1,1 3,3

__Sample Output__

1.0

__ Problem Statement__

Find the Overlapping Area of two rectangles with the given co ordinates

-3.5, 4 1, 1

1, 3.5 -2.5, -1

### This challenge is worth 60 points.

### You must be logged in to submit a solution

View ranklist for this challenge

About scoring and submission