intersectVertically method

bool intersectVertically(
  1. IntRect other
)

Checks if this rectangle intersects vertically with another rectangle.

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

Implementation

bool intersectVertically(final IntRect other) {
  if (other.top > bottom || other.bottom < top) {
    return false;
  }
  return true;
}