Skip to content

Interval

Public Struct

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

Name

Description


Public Method

Initializes a new instance copying the other instance values.


Public Method

Initializes a new instance of the Rhino.Geometry.Interval class.


Properties

Name

Description


Public Property

Returns true if T[0] > T[1].


Public Property

Returns true if T0 < T1.


Public Property

Returns true if T0 == T1 != ON.UnsetValue.


Public Property

Gets a value indicating whether or not this Interval is valid. Valid intervals must contain valid numbers.


Public Property

Gets or sets the indexed bound of this Interval.


Public Property

Gets the signed length of the numeric range. If the interval is decreasing, a negative length will be returned.


Public Property

Gets the larger of T0 and T1.


Public Property
Code Example

Gets the average of T0 and T1.


Public Property

Gets the smaller of T0 and T1.


Public Property

Gets or sets the lower bound of the Interval.


Public Property

Gets or sets the upper bound of the Interval.


Public Property
Static Member

Gets an Interval whose limits are RhinoMath.UnsetValue.


Methods

Name

Description


Public Method

Compares this Interval with another interval.

The lower bound has first evaluation priority.


Public Method

Check that all values in other are within epsilon of the values in this


Public Method

Determines whether the specified Interval is equal to the current Interval, comparing by value.


Public Method

Determines whether the specified Object is equal to the current Interval, comparing by value.

(Overrides ValueType.Equals(Object).)


Public Method
Static Member

Returns a new Interval that is the Intersection of the two input Intervals.


Public Method
Static Member

Returns a new Interval which contains both inputs.


Public Method

Computes the hash code for this Interval object.

(Overrides ValueType.GetHashCode..)


Public Method

GetType

Gets the Type of the current instance.

(Inherited from Object.)


Public Method

Grows the Interval to include the given number.


Public Method

Tests another interval for Interval inclusion.


Public Method

Tests another interval for Interval inclusion.


Public Method

Tests a parameter for Interval inclusion.


Public Method

Tests a parameter for Interval inclusion.


Public Method

Ensures this Interval is either singleton or increasing.


Public Method

Converts interval value, or pair of values, to normalized parameter.


Public Method

Converts interval value, or pair of values, to normalized parameter.


Public Method

Converts normalized parameter to interval value, or pair of values.


Public Method

Converts normalized parameter to interval value, or pair of values.


Public Method

Changes interval to [-T1, -T0].


Public Method

Exchanges T0 and T1.


Public Method

Returns a string representation of this Interval.

(Overrides ValueType.ToString..)


Operators

Name

Description


Public Operator
Static Member
Addition(Double, Interval)

Shifts an interval by a specific amount (addition).


Public Operator
Static Member
Addition(Interval, Double)

Shifts a Interval by a specific amount (addition).


Public Operator
Static Member
Equality

Determines whether the two Intervals have equal values.


Public Operator
Static Member
GreaterThan

Determines whether the first specified Interval comes after (has superior sorting value than) the second Interval.

The lower bound has first evaluation priority.


Public Operator
Static Member
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.


Public Operator
Static Member
Inequality

Determines whether the two Intervals have different values.


Public Operator
Static Member
LessThan

Determines whether the first specified Interval comes before (has inferior sorting value than) the second Interval.

The lower bound has first evaluation priority.


Public Operator
Static Member
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.


Public Operator
Static Member
Subtraction(Double, Interval)

Shifts an interval by a specific amount (subtraction).


Public Operator
Static Member
Subtraction(Interval, Double)

Shifts an interval by a specific amount (subtraction).