overlaps method

bool overlaps(
  1. Range other
)

True of this range overlaps with other.

Implementation

bool overlaps(Range other) {
  return start < other.end && end > other.start;
}