isOverlap static method

bool isOverlap(
  1. Rect rc1,
  2. Rect rc2
)

Implementation

static bool isOverlap(Rect rc1, Rect rc2) {
  return rc1.left + rc1.width > rc2.left &&
      rc2.left + rc2.width > rc1.left &&
      rc1.top + rc1.height > rc2.top &&
      rc2.top + rc2.height > rc1.top;
}