Exemplo n.º 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);
 }
Exemplo n.º 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);
 }