Vocabularymath.
intervalsInputsOutputsWord descriptionTests if
x is contained in
interval.
ExamplesUSING: math.intervals prettyprint ;
1.5 1 2 [a,b] interval-contains? .
t
Half-open endpoints are not contained:
USING: math.intervals prettyprint ;
1 1 2 (a,b] interval-contains? .
f
The empty interval obviously does not contain an interval:
USING: math.intervals prettyprint ;
1 2 (a,b] empty-interval interval-contains? .
f
See alsointerval-subset?DefinitionMethods