Java implementation of a rectangle intersection algorithm ..?

I am interested in this algorithm: Algorithm for detecting the intersection of two rectangles?

but unable to realize it himself, not even having basic math skills. I think I could understand this better as soon as I can read the code. Could someone perhaps already implement it or can write it quickly?

Thank!

+3
source share
1 answer

If you use Java, all implementations of the Shape interface have an intersection method that takes a rectangle.

from Algorithm for detecting the intersection of two rectangles?

Java doc

+2
source

Source: https://habr.com/ru/post/1763501/


All Articles