intersects method

bool intersects(
  1. Interval other
)

Implementation

bool intersects(Interval other) => start <= other.end && end >= other.start;