Detect overlap between this interval and other given interval
in a half-open coordinate system [start, end)
Top-level function template for reuse by many types of Interval objects
Template type parameter Interval Type must have {start, end}
Still usable with member-function style due to UFCS: interval.overlaps(other)
return true in any of the following four situations:
int1 ===== =======
int2 ======= =======
int1 ======= =======
int2 === =======
return false in any other scenario:
int1 ===== | =====
int2 ===== | =====
NOTE that in half-open coordinates [start, end)
i1.end == i2.start => Adjacent, but NO overlap
Detect overlap between this interval and other given interval in a half-open coordinate system [start, end)
Top-level function template for reuse by many types of Interval objects Template type parameter Interval Type must have {start, end} Still usable with member-function style due to UFCS: interval.overlaps(other)
return true in any of the following four situations: int1 ===== ======= int2 ======= =======
int1 ======= ======= int2 === =======
return false in any other scenario: int1 ===== | ===== int2 ===== | =====
NOTE that in half-open coordinates [start, end) i1.end == i2.start => Adjacent, but NO overlap