Click or drag to resize

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
Public methodInterval(Interval)
Initializes a new instance copying the other instance values.
Public methodInterval(Double, Double)
Initializes a new instance of the Rhino.Geometry.Interval class.
Top
Properties
  NameDescription
Public propertyIsDecreasing
Returns true if T[0] > T[1].
Public propertyIsIncreasing
Returns true if T0 < T1.
Public propertyIsSingleton
Returns true if T0 == T1 != ON.UnsetValue.
Public propertyIsValid
Gets a value indicating whether or not this Interval is valid. Valid intervals must contain valid numbers.
Public propertyItem
Gets or sets the indexed bound of this Interval.
Public propertyLength
Gets the signed length of the numeric range. If the interval is decreasing, a negative length will be returned.
Public propertyMax
Gets the larger of T0 and T1.
Public propertyCode exampleMid
Gets the average of T0 and T1.
Public propertyMin
Gets the smaller of T0 and T1.
Public propertyT0
Gets or sets the lower bound of the Interval.
Public propertyT1
Gets or sets the upper bound of the Interval.
Public propertyStatic memberUnset
Gets an Interval whose limits are RhinoMath.UnsetValue.
Top
Methods
  NameDescription
Public methodCompareTo
Compares this Interval with another interval.

The lower bound has first evaluation priority.

Public methodEpsilonEquals
Check that all values in other are within epsilon of the values in this
Public methodEquals(Interval)
Determines whether the specified Interval is equal to the current Interval, comparing by value.
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Interval, comparing by value.
(Overrides ValueTypeEquals(Object).)
Public methodStatic memberFromIntersection
Returns a new Interval that is the Intersection of the two input Intervals.
Public methodStatic memberFromUnion
Returns a new Interval which contains both inputs.
Public methodGetHashCode
Computes the hash code for this Interval object.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGrow
Grows the Interval to include the given number.
Public methodIncludesInterval(Interval)
Tests another interval for Interval inclusion.
Public methodIncludesInterval(Interval, Boolean)
Tests another interval for Interval inclusion.
Public methodIncludesParameter(Double)
Tests a parameter for Interval inclusion.
Public methodIncludesParameter(Double, Boolean)
Tests a parameter for Interval inclusion.
Public methodMakeIncreasing
Ensures this Interval is either singleton or increasing.
Public methodNormalizedIntervalAt
Converts interval value, or pair of values, to normalized parameter.
Public methodNormalizedParameterAt
Converts interval value, or pair of values, to normalized parameter.
Public methodParameterAt
Converts normalized parameter to interval value, or pair of values.
Public methodParameterIntervalAt
Converts normalized parameter to interval value, or pair of values.
Public methodReverse
Changes interval to [-T1, -T0].
Public methodSwap
Exchanges T0 and T1.
Public methodToString
Returns a string representation of this Interval.
(Overrides ValueTypeToString.)
Top
Operators
  NameDescription
Public operatorStatic memberAddition(Double, Interval)
Shifts an interval by a specific amount (addition).
Public operatorStatic memberAddition(Interval, Double)
Shifts a Interval by a specific amount (addition).
Public operatorStatic memberEquality
Determines whether the two Intervals have equal values.
Public operatorStatic memberGreaterThan
Determines whether the first specified Interval comes after (has superior sorting value than) the second Interval.

The lower bound has first evaluation priority.

Public operatorStatic memberGreaterThanOrEqual
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 operatorStatic memberInequality
Determines whether the two Intervals have different values.
Public operatorStatic memberLessThan
Determines whether the first specified Interval comes before (has inferior sorting value than) the second Interval.

The lower bound has first evaluation priority.

Public operatorStatic memberLessThanOrEqual
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 operatorStatic memberSubtraction(Double, Interval)
Shifts an interval by a specific amount (subtraction).
Public operatorStatic memberSubtraction(Interval, Double)
Shifts an interval by a specific amount (subtraction).
Top
See Also