overlaps method

bool overlaps(
  1. Rectangle other
)

Returns whether other overlaps this rectangle.

Implementation

bool overlaps(Rectangle other) =>
    !(other.maxX <= minX ||
        other.minX >= maxX ||
        other.maxY <= minY ||
        other.minY >= maxY);