Function doRangesOverlap

  • Parameters

    • a: number[]

      range with two numbers

    • b: number[]

      range with two numbers

    • Optional epsilon: number = EPSILON

      a positive value makes the range endpoints exclusive, a negative value makes range endpoints inclusive.

    Returns boolean

    Description

    a range is an array of two numbers [start, end] not necessarily in sorted order. Do the two spans overlap on the numberline?