Interval is a pair of numbers or a pair of any comparable objects on which may be defined predicates equal, less and method max(p1, p1) that returns maximum in a pair. When interval is an object rather than pair of numbers, this object should have properties low, high, max and implement methods lessThan(), equalTo(), intersect(), notIntersect(), clone(), output(). Two static methods comparable_max(), comparable_less_than() define how to compare values in pair.
This interface is described in typescript definition file index.d.ts

Axis aligned rectangle is an example of such interval. We may look at rectangle as an interval between its low left and top right corners. See Box class Box library as the example of Interval interface implementation

Implements

Constructors

  • Parameters

    • low: any
    • high: any

    Returns NumberInterval

Properties

high: number
low: number

Accessors

Methods

  • Parameters

    Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    Returns boolean

  • Returns [any, any]

  • Predicate returns true if first value less than second value

    Parameters

    • val1: number
    • val2: number

    Returns boolean