index

patterns: overlaps


/* 
------t0-----t1---A--------B--- do the intervals overlap? 

Note: assumes t0<=t1 and A<=B. 
*/ 
bool overlap(doub t0, doub t1, doub A, doub B) { 
	return !(t1<A || t0>B); 
}
Easier to determine if they are disjoint: does one start after
the other ends, or end before the other starts?

nedwaves.com 2017 [171108]