I need an algorithm to solve this problem: Given 2 rectangles intersecting or overlapping together in any corner, how do I determine the total area for the two rectangles wi
Sorry to come to the party late. I dont know if you are looking language specific : But on iOS its pretty easy :
CGRectIntersection
https://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CGGeometry/#//apple_ref/c/func/CGRectIntersection
It would give you CGrect that is overlappring by given two rects. if they are not intersecting is would return CGRectIsNull.
hope this help at least someone. Happy coding