Beispiel #1
0
 /// <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);
 }
Beispiel #2
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);
 }