﻿Interval Structure  # Interval Structure

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

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll) Syntax
```[SerializableAttribute]
public struct Interval : ISerializable, IEquatable<Interval>,
IComparable<Interval>, IComparable, IEpsilonComparable<Interval>```

The Interval type exposes the following members. Constructors
NameDescription Interval(Interval)
Initializes a new instance copying the other instance values. Interval(Double, Double)
Initializes a new instance of the Rhino.Geometry.Interval class.
Top Properties
NameDescription IsDecreasing
Returns true if T > T. IsIncreasing
Returns true if T0 < T1. IsSingleton
Returns true if T0 == T1 != ON.UnsetValue. IsValid
Gets a value indicating whether or not this Interval is valid. Valid intervals must contain valid numbers. Item
Gets or sets the indexed bound of this Interval. Length
Gets the signed length of the numeric range. If the interval is decreasing, a negative length will be returned. Max
Gets the larger of T0 and T1.  Mid
Gets the average of T0 and T1. Min
Gets the smaller of T0 and T1. T0
Gets or sets the lower bound of the Interval. T1
Gets or sets the upper bound of the Interval.  Unset
Gets an Interval whose limits are RhinoMath.UnsetValue.
Top Methods
NameDescription CompareTo
Compares this Interval with another interval.

The lower bound has first evaluation priority. EpsilonEquals
Check that all values in other are within epsilon of the values in this Equals(Object)
Determines whether the specified Object is equal to the current Interval, comparing by value.
(Overrides ValueTypeEquals(Object).) Equals(Interval)
Determines whether the specified Interval is equal to the current Interval, comparing by value.  FromIntersection
Returns a new Interval that is the Intersection of the two input Intervals.  FromUnion
Returns a new Interval which contains both inputs. GetHashCode
Computes the hash code for this Interval object.
(Overrides ValueTypeGetHashCode.) GetType
Gets the Type of the current instance.
(Inherited from Object.) Grow
Grows the Interval to include the given number. IncludesInterval(Interval)
Tests another interval for Interval inclusion. IncludesInterval(Interval, Boolean)
Tests another interval for Interval inclusion. IncludesParameter(Double)
Tests a parameter for Interval inclusion. IncludesParameter(Double, Boolean)
Tests a parameter for Interval inclusion. MakeIncreasing
Ensures this Interval is either singleton or increasing. NormalizedIntervalAt
Converts interval value, or pair of values, to normalized parameter. NormalizedParameterAt
Converts interval value, or pair of values, to normalized parameter. ParameterAt
Converts normalized parameter to interval value, or pair of values. ParameterIntervalAt
Converts normalized parameter to interval value, or pair of values. Reverse
Changes interval to [-T1, -T0]. Swap
Exchanges T0 and T1. ToString
Returns a string representation of this Interval.
(Overrides ValueTypeToString.)
Top Operators
NameDescription  Addition(Double, Interval)
Shifts an interval by a specific amount (addition).  Addition(Interval, Double)
Shifts a Interval by a specific amount (addition).  Equality
Determines whether the two Intervals have equal values.  GreaterThan
Determines whether the first specified Interval comes after (has superior sorting value than) the second Interval.

The lower bound has first evaluation priority.  GreaterThanOrEqual
Determines whether the first specified Interval comes after (has superior sorting value than) the second Interval, or is equal to it.

The lower bound has first evaluation priority.  Inequality
Determines whether the two Intervals have different values.  LessThan
Determines whether the first specified Interval comes before (has inferior sorting value than) the second Interval.

The lower bound has first evaluation priority.  LessThanOrEqual
Determines whether the first specified Interval comes before (has inferior sorting value than) the second Interval, or is equal to it.

The lower bound has first evaluation priority.  Subtraction(Double, Interval)
Shifts an interval by a specific amount (subtraction).  Subtraction(Interval, Double)
Shifts an interval by a specific amount (subtraction).
Top Version Information

#### Rhino for Mac

Supported in: 5.4

#### Rhino for Windows

Supported in: 6.20 See Also