Optional
numberReadonly
lowerReadonly
lowerReadonly
numberReadonly
upperReadonly
upperStatic
Readonly
BottomOptional
numberTransform: NumberTransformStatic
Readonly
BottomOptional
numberTransform: NumberTransformStatic
Readonly
ClosedOptional
numberTransform: NumberTransformStatic
Readonly
OpenOptional
numberTransform: NumberTransformStatic
Readonly
TopOptional
numberTransform: NumberTransformStatic
Readonly
TopOptional
numberTransform: NumberTransformTrue if x is included in this Interval
Number to search for
The Interval's diameter(/length/width)
True if this Interval equals an empty set
The Interval's radius(diameter/2)
Transforms the Interval to its string representation using square brackets for included and parentheses for excluded endpoints
console.log(Interval.BottomClosed(0,1)) // "[0,1)"
This interval's string representation
Static
Readonly
PointOptional
numberTransform: NumberTransformStatic
fromConstructs an Interval from a string representation
Included endpoints are denoted by square brackets and excluded ones by either parentheses or reversed square brackets. Prefer constructing directly from number values instead of strings if possible
Interval.fromString("[0,1)").equals(Interval.BottomClosed(0,1)) // true
Interval.fromString("[0,1[").equals(Interval.fromString("[0,1)")) // true
Interval corresponding to the string representation
ParseError if s is malformed
String representation of the Interval
Optional
numberTransform: NumberTransformSee Interval for more information
Generated using TypeDoc
A connected set represented by its endpoints lowerBound and upperBound.
Remarks
Consider using the aliases described down below instead of specifying bound inclusion by hand.
Some common intervals are already defined like Real and NonNegative.
All intervals can be constructed with a NumberTransform that can be used to
Number.isSafeInteger(x)
(think of them as type constraints)The NumberTransform is propagated by all functions returning Interval or NumberSet using the NumberTransform from the called Interval.
Aliases: