Open Sulyma30 opened 1 year ago
We can instead check whether any outermost point of one interval is inside of another interval:
def check_intervals_intersection(a,b,c,d): if (a <= d and a >= c) or (b <= d and b >= c) or (c <= b and c >= a) or (d <= b and d >= a): return True else: return False
If a bbox degenerates into an interval (x_min=x_max or y_min=y_max), then corresponding width=0 and intersection is not counted