intersects method

bool intersects(
  1. Bounds other
)

Whether the bounds intersect another bounds.

Implementation

bool intersects(Bounds other) {
  return left < other.right &&
      right > other.left &&
      top < other.bottom &&
      bottom > other.top;
}