=====Déterminer si deux intervalles se superposent===== bool overlap = a.start < b.end && b.start < a.end; Si on souhaite que les bornes soient inclues dans la collision, il faut mettre ''%%<=%%''. [[http://stackoverflow.com/questions/13513932/algorithm-to-detect-overlapping-periods|Algorithm to detect overlapping periods]] {{ :helloworld:algorithms:ranges:c_-_algorithm_to_detect_overlapping_periods_-_stack_overflow_2019-10-25_11_24_38_.html |Archive du 22/11/2012 le 25/10/2019}}