/// <summary> /// Whether two ranges intersect each other. /// </summary> public bool IntersectsExclusive(Range <T> other) { return(other.To.CompareTo(From) > 0 && other.From.CompareTo(To) < 0); }
/// <summary> /// Whether two ranges intersect each other. /// </summary> public bool Intersects(Range <T> other) { return(other.To.CompareTo(From) >= 0 && other.From.CompareTo(To) <= 0); }