intersects method

bool intersects(
  1. IntRect other
)

Checks if this rectangle intersects with another rectangle.

other The other rectangle to check for intersection. Returns true if the rectangles intersect, false otherwise.

Implementation

bool intersects(final IntRect other) {
  if (intersectVertically(other) && intersectHorizontal(other)) {
    return true;
  }
  return false;
}