Function intervalsOverlap

  • Checks if the intervals x, y overlap i.e. if they share at least one value

    Example

    Interval.intervalsOverlap(
    Interval(0, 3),
    Interval(1, 2)
    ) // true
    Interval.intervalsOverlap(
    Interval(0, 2),
    Interval(1, 3)
    ) // true
    Interval.intervalsOverlap(
    Interval(0, 2),
    Interval(2, 3)
    ) // true
    Interval.intervalsOverlap(
    Interval(0, 1),
    Interval(2, 3)
    ) // false

    Returns

    Parameters

    • x: IInterval
    • y: IInterval

    Returns boolean

Generated using TypeDoc