views:

47

answers:

1

Hi,

I am interested in this algorithm: http://stackoverflow.com/questions/115426/algorithm-to-detect-intersection-of-two-rectangles

but unable to implement it myself lacking even basic mathematical skills. I think I could understand it better once I can read the code. Does somebody perhaps have already an implementation or can quickly write one?

Thanks!

+2  A: 

If you're using Java, all implementations of the Shape interface have an intersects method that take a rectangle.

from http://stackoverflow.com/questions/115426/algorithm-to-detect-intersection-of-two-rectangles/115476#115476

Java doc

randomguy