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

Constructors

  • Returns Interval

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

    Parameters

    • t0: number

      The first value.

    • t1: number

      The second value.

    Returns Interval

  • Returns Interval

Properties

T0: number
T1: number
unset: Interval

Gets an Interval whose limits are RhinoMath.UnsetValue.

zeroToOne: Interval

Gets an Interval whose limits are 0.0 and 1.0.

zeroToTwoPi: Interval

Gets an Interval whose limits are 0.0 and 2*Pi.

Methods

  • Compares this Interval with another interval.

    The lower bound has first evaluation priority.

    Parameters

    Returns number

    0: if this is identical to other -1: if this[0] < other[0] +1: if this[0] > other[0] -1: if this[0] == other[0] and this[1] < other[1] +1: if this[0] == other[0] and this[1] > other[1] .

  • Returns Interval

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

    Parameters

    • t0: number

      The first value.

    • t1: number

      The second value.

    Returns Interval

  • Returns Interval

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

    Parameters

    Returns boolean

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

    Parameters

    Returns boolean

    true if obj is an Interval and has the same bounds; false otherwise.

  • Expand an interval by adding the value to T1 and subtracting it from T0. If T1 < T0, T0 and T1 are swapped.

    Parameters

    Returns void

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

    Parameters

    Returns Interval

    If the intersection is not empty, then intersection = [max(a.Min(),b.Min()), min(a.Max(),b.Max())] The interval [ON.UnsetValue,ON.UnsetValue] is considered to be the empty set interval. The result of any intersection involving an empty set interval or disjoint intervals is the empty set interval.

  • Returns a new Interval which contains both inputs.

    Parameters

    Returns Interval

    The union of an empty set and an increasing interval is the increasing interval. The union of two empty sets is empty. The union of an empty set an a non-empty interval is the non-empty interval. The union of two non-empty intervals is [min(a.Min(),b.Min()), max(a.Max(),b.Max())]

  • Grows the Interval to include the given number.

    Parameters

    • interval: Interval
    • value: number

      Number to include in this interval.

    Returns void

  • Tests another interval for Interval inclusion.

    Parameters

    Returns boolean

    true if the other interval is contained within or is coincident with the limits of this Interval; otherwise false.

  • Tests another interval for Interval inclusion.

    Parameters

    • intervalValue: Interval
    • interval: Interval

      Interval to test.

    • strict: boolean

      If true, the other interval must be fully on the inside of the Interval.

    Returns boolean

    true if the other interval is contained within the limits of this Interval; otherwise false.

  • Tests a parameter for Interval inclusion.

    Parameters

    • interval: Interval
    • t: number

      Parameter to test.

    Returns boolean

    true if t is contained within or is coincident with the limits of this Interval.

  • Tests a parameter for Interval inclusion.

    Parameters

    • interval: Interval
    • t: number

      Parameter to test.

    • strict: boolean

      If true, the parameter must be fully on the inside of the Interval.

    Returns boolean

    true if t is contained within the limits of this Interval.

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

    Parameters

    Returns boolean

  • Returns true if T0 < T1.

    Parameters

    Returns boolean

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

    Parameters

    Returns boolean

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

    Parameters

    Returns boolean

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

    Parameters

    Returns number

  • Ensures this Interval is either singleton or increasing.

    Parameters

    Returns void

  • Gets the larger of T0 and T1.

    Parameters

    Returns number

  • Gets the average of T0 and T1.

    Parameters

    Returns number

  • Gets the smaller of T0 and T1.

    Parameters

    Returns number

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

    Parameters

    Returns Interval

    Normalized parameter x so that min*(1.0-x) + max*x = intervalParameter.

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

    Parameters

    • interval: Interval
    • intervalParameter: number

    Returns number

    Normalized parameter x so that min*(1.0-x) + max*x = intervalParameter.

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

    Parameters

    • interval: Interval
    • normalizedParameter: number

    Returns number

    Interval parameter min*(1.0-normalizedParameter) + max*normalizedParameter.

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

    Parameters

    Returns Interval

    Interval parameter min*(1.0-normalizedParameter) + max*normalized_paramete.

  • Changes interval to [-T1, -T0].

    Parameters

    Returns void

  • Exchanges T0 and T1.

    Parameters

    Returns void

  • Returns a string representation of this Interval.

    Parameters

    Returns string

    A string with T0,T1.