/// <summary> /// The compare. /// </summary> /// <param name="x"> /// The x. /// </param> /// <param name="y"> /// The y. /// </param> /// <returns> /// The <see cref="int"/>. /// </returns> public int Compare(IEndPoint <T> x, IEndPoint <T> y) { var result = x.CompareTo(y); if (result == 0) { if (x.IsMin == !y.IsMin && x.IsInclusive && y.IsInclusive) { // Min endPoint always comes AFTER Max endPoint result = x.IsMin ? +1 : -1; } } return(result); }