Given a Bounds
structure like this:
struct Bounds {
public double xMin;
public double xMax;
public double yMin;
public double yMax;
}
I'm trying to find out how two Bounds
A and B intersect. Possible results are:
- A and B do not intersect at all
- A and B are equal
- A fully contains B
- B fully contains A
- A and B intersect each other
My first and naive attempt at it, is to test how many points of A are in B and how many points of B are in A, but I need this test to be as fast as possible and there is probably a better way to do it.
Thanks a lot !