protected bool GreaterOrEqualTo(IntervalPoint <T> other) { if (this.IsInfinity() || other.IsInfinity()) { return(InfinityGreaterThanComparisons(other)); } return(this.Point.CompareTo(other.Point) > 0 || (!this.IsOpen && !other.IsOpen && this.Point.CompareTo(other.Point) == 0)); }
private bool InfinityLessThanComparisons(IntervalPoint <T> other) { if (!this.IsInfinity() && !other.IsInfinity()) { throw new ArgumentOutOfRangeException("At least one value must be infinity"); } return(!(this.IsPositiveInfinity() || other.IsNegativeInfinity())); }
protected bool GreaterThan(IntervalPoint <T> other) { if (this.IsInfinity() || other.IsInfinity()) { return(InfinityGreaterThanComparisons(other)); } return(this.Point.CompareTo(other.Point) > 0); }