20 public class IntervalT<T> where T : struct, IComparable<T>
32 if (minimum.CompareTo(maximum) > 0)
35 "Maximum value has to be bigger than or equal to the minimum value");
59 public override bool Equals(
object? obj)
66 if (ReferenceEquals(
this, obj))
104 return Formatting.Invariant($
"{GetType().Name}{{ Minimum = {Minimum}, Maximum = {Maximum} }}");
124 : base(minimum, maximum)
144 : base(minimum, maximum)
164 : base(minimum, maximum)
184 : base(minimum, maximum)
Exception thrown when an invalid parameter is detected.
Represents an interval consisting of a lower and upper boundary value.
override int GetHashCode()
Returns a hash code for the current interval.
override bool Equals(object? obj)
Determines whether the specified object is equal to the current interval.
override string ToString()
Returns a string representation of the interval.
IntervalT(T minimum, T maximum)
Initializes a new instance of the IntervalT<T> class with specified boundaries.
T Maximum
Gets the upper boundary of the interval.
T Minimum
Gets the lower boundary of the interval.
Represents an interval with double-precision floating-point boundaries.
IntervalD(double minimum, double maximum)
Initializes a new instance of the IntervalD class with specified boundaries.
Represents an interval with floating-point boundaries.
IntervalF(float minimum, float maximum)
Initializes a new instance of the IntervalF class with specified boundaries.
Represents an interval with signed integer boundaries.
Interval(int minimum, int maximum)
Initializes a new instance of the Interval class with specified boundaries.
Represents an interval with unsigned integer boundaries.
IntervalU(uint minimum, uint maximum)
Initializes a new instance of the IntervalU class with specified boundaries.