Reputation: 51
I am interested in this algorithm: 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!
Upvotes: 3
Views: 5053
Reputation: 12242
If you're using Java, all implementations of the Shape interface have an intersects method that take a rectangle.
from Algorithm to detect intersection of two rectangles?
Upvotes: 2