overlaps method

bool overlaps(
  1. Range otherRange
)
inherited

Defines if this range overlaps otherRange

Implementation

bool overlaps(Range otherRange) {
  if (start > otherRange.start) {
    return otherRange.end >= start;
  }
  if (end < otherRange.end) {
    return otherRange.start <= end;
  }
  return containsRange(otherRange);
}