public int CompareTo(IValueContainer <T, V> other) { int result = 0; if (!other.Equals(this)) { if (other.PlusInfinity) { result = -1; // this is smaller } else if (other.MinusInfinity) { result = 1; // this is bigger } else if (this.PlusInfinity) { result = 1; // this is bigger } else if (this.MinusInfinity) { result = -1; // this is smaller } else { result = this.Points.CompareTo(other.Points); } } return(result); }