I recently came across a problem where I had four circles (midpoints and radius) and had to calculate the area of the union of these circles.
I\'ve been using the following code to detect browser client area width for ages and it wokred 100% with all browsers, including FF, Safari and various versions of IE. However, now when I switched to
Edit: Simple code I used to solve the problem in case anyone is interested (thanks to Fredrik): int windowOverlap(Rectangle rect1, Rectangle rect2)