# Interval struct

Namespace: [Rhino.Geometry](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.geometry.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 16)]
[DebuggerDisplay("({m_t0}, {m_t1})")]
[Serializable]
public struct Interval : ISerializable, IEquatable<Interval>, IComparable<Interval>, IComparable, IEpsilonComparable<Interval>
```

Represents an interval in one-dimensional space, that is defined as two extrema or bounds.

## Constructors

- [Interval](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/ctor.md): (2 overloads) Initializes a new instance of the Rhino.Geometry.Interval class.

## Properties

- [IsDecreasing](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/isdecreasing.md): Returns true if T[0] > T[1].
- [IsIncreasing](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/isincreasing.md): Returns true if T0 < T1.
- [IsSingleton](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/issingleton.md): Returns true if T0 == T1 != ON.UnsetValue.
- [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/isvalid.md): Gets a value indicating whether or not this Interval is valid. Valid intervals must contain valid numbers.
- [Length](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/length.md): Gets the signed length of the numeric range. If the interval is decreasing, a negative length will be returned.
- [Max](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/max.md): Gets the larger of T0 and T1.
- [Mid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/mid.md): Gets the average of T0 and T1.
- [Min](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/min.md): Gets the smaller of T0 and T1.
- [T0](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/t0.md): Gets or sets the lower bound of the Interval.
- [T1](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/t1.md): Gets or sets the upper bound of the Interval.
- [Unset](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/unset.md): (static) Gets an Interval whose limits are RhinoMath.UnsetValue.
- [ZeroToOne](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/zerotoone.md): (static) Gets an Interval whose limits are 0.0 and 1.0.
- [ZeroToTwoPi](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/zerototwopi.md): (static) Gets an Interval whose limits are 0.0 and 2*Pi.

## Indexers

- [this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/item.md): Gets or sets the indexed bound of this Interval.

## Methods

- [CompareTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/compareto.md): Compares this [Interval](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval.md) with another interval. The lower bound has first evaluation priority.
- [EpsilonEquals](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/epsilonequals.md): Check that all values in other are within epsilon of the values in this
- [Equals](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/equals.md): (2 overloads) Determines whether the specified [Interval](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval.md) is equal to the current [Interval](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval.md), comparing by value.
- [Expand](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/expand.md): Expand an interval by adding the value to T1 and subtracting it from T0. If T1 < T0, T0 and T1 are swapped.
- [FromIntersection](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/fromintersection.md): (static) Returns a new Interval that is the Intersection of the two input Intervals.
- [FromUnion](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/fromunion.md): (static) Returns a new Interval which contains both inputs.
- [GetHashCode](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/gethashcode.md): Computes the hash code for this [Interval](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval.md) object.
- [Grow](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/grow.md): Grows the [Interval](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval.md) to include the given number.
- [IncludesInterval](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/includesinterval.md): (2 overloads) Tests another interval for Interval inclusion.
- [IncludesParameter](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/includesparameter.md): (2 overloads) Tests a parameter for Interval inclusion.
- [MakeIncreasing](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/makeincreasing.md): Ensures this [Interval](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval.md) is either singleton or increasing.
- [NormalizedIntervalAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/normalizedintervalat.md): Converts interval value, or pair of values, to normalized parameter.
- [NormalizedParameterAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/normalizedparameterat.md): Converts interval value, or pair of values, to normalized parameter.
- [ParameterAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/parameterat.md): Converts normalized parameter to interval value, or pair of values.
- [ParameterIntervalAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/parameterintervalat.md): Converts normalized parameter to interval value, or pair of values.
- [Reverse](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/reverse.md): Changes interval to [-T1, -T0].
- [Swap](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/swap.md): Exchanges T0 and T1.
- [IComparable.CompareTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/system-icomparable-compareto.md)
- [ISerializable.GetObjectData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/system-runtime-serialization-iserializable-getobjectdata.md)
- [ToString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/tostring.md): Returns a string representation of this [Interval](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval.md).

## Operators

- [operator +](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/op-addition.md): (2 overloads, static) Shifts an interval by a specific amount (addition).
- [operator ==](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/op-equality.md): (static) Determines whether the two Intervals have equal values.
- [operator >](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/op-greaterthan.md): (static) Determines whether the first specified [Interval](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval.md) comes after (has superior sorting value than) the second Interval. The lower bound has first evaluation priority.
- [operator >=](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/op-greaterthanorequal.md): (static) Determines whether the first specified [Interval](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval.md) comes after (has superior sorting value than) the second Interval, or is equal to it. The lower bound has first evaluation priority.
- [operator !=](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/op-inequality.md): (static) Determines whether the two Intervals have different values.
- [operator <](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/op-lessthan.md): (static) Determines whether the first specified [Interval](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval.md) comes before (has inferior sorting value than) the second Interval. The lower bound has first evaluation priority.
- [operator <=](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/op-lessthanorequal.md): (static) Determines whether the first specified [Interval](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval.md) comes before (has inferior sorting value than) the second Interval, or is equal to it. The lower bound has first evaluation priority.
- [operator -](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interval/op-subtraction.md): (2 overloads, static) Shifts an interval by a specific amount (subtraction).
