Interval Structure

Represents an interval on the real number line.

Definition

Namespace: Meta.Numerics
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public readonly struct Interval : IEquatable<Interval>
Inheritance
Object    ValueType    Interval
Implements
IEquatableInterval

Remarks

Properties

LeftEndpoint Gets the left (lower) endpoint of the interval.
Midpoint Gets the mid-point of the interval.
RightEndpoint Gets the right (upper) endpoint of the interval.
Width Gets the width of the interval.

Methods

ClosedContains Determines whether the argument lies in the closed interval.
Contains(Double) Determines whether a given point is contained in the closed interval.
Contains(Double, IntervalType) Determines whether a given point is contained in the closed or open interval.
Contains(Double, IntervalType, IntervalType) Determines whether a given point is contained in the interval, with the left and right endpoints separately specififed as closed or open.
Equals(Interval) Tests wither the current instance is equal to another interval.
Equals(Object) Tests whether a given object is equal to the current interval.
(Overrides ValueTypeEquals(Object))
FromEndpointAndWidth Creates a new interval, given its lower endpoint and width.
FromEndpoints Creates a new interval, given its endpoints.
FromMidpointAndWidth Creates a new interval, given its midpoint and width.
GetHashCodeReturns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
OpenContains Determines whether the argument lies in the open interval.
ToString Produces a string representation of the interval.
(Overrides ValueTypeToString)

Operators

Equality(Interval, Interval) Tests whether two intervals are equal.
Inequality(Interval, Interval) Tests whether two intervals are not equal.

Fields

Infinite The entire number line.
Semiinfinite The number line from zero to positive infinity.
Unit The unit interval.

See Also