testIntersects2D static method
Returns true if box1
and box2
intersects in 2D.
Implementation
static bool testIntersects2D(Box box1, Box box2) {
return !(box1.minX > box2.maxX ||
box1.maxX < box2.minX ||
box1.minY > box2.maxY ||
box1.maxY < box2.minY);
}