testIntersects2D static method

bool testIntersects2D(
  1. Box box1,
  2. Box box2
)

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);
}