intersects method

bool intersects(
  1. Interval other
)

Returns true if this interval intersects with the other interval.

Implementation

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