Example #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public int CompareTo(ComparerRange <T> other)
 {
     return(comparer.Compare(min, other.min));
 }
Example #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="range"></param>
 /// <returns></returns>
 public bool Overlaps(ComparerRange <T> range)
 {
     return(Contains(range.min) || Contains(range.max) || range.Contains(min) || range.Contains(max));
 }
Example #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="range"></param>
 /// <returns></returns>
 public bool Touches(ComparerRange <T> range)
 {
     return(comparer.Compare(max, range.min) == 0 || comparer.Compare(min, range.max) == 0);
 }
Example #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="range"></param>
 /// <returns></returns>
 public bool Contains(ComparerRange <T> range)
 {
     return(comparer.Compare(min, range.min) <= 0 && comparer.Compare(max, range.max) >= 0);
 }