public static OrderedRange Merge(this OrderedRange @this, OrderedRange other) { return(new OrderedRange( Math.Min(@this.Start, other.Start), Math.Max(@this.End, other.End))); }
public static bool OverlapsWith(this OrderedRange @this, OrderedRange other) { return(@this.Start <= other.Start ? @this.End >= other.Start : other.End >= @this.Start); }