/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> public int CompareTo(ComparerRange <T> other) { return(comparer.Compare(min, other.min)); }
/// <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)); }
/// <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); }
/// <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); }