;Check if two bounding boxes intersect ; input ; bbox1 - 4 element array of ints, [left, bottom, right, top] describing a bbox ; bbox2 - 4 element array of ints, describing the other bbox ; return ; 1 if bboxes intersect, 0 otherwise ; function is_bbox_intersect,bbox1,bbox2 if bbox1[2] lt bbox2[0] then return,0 ;if bbox1.rightbbox2.right, no intersect if bbox1[3] lt bbox2[1] then return,0 ;if bbox1.topbbox2.top, no intersect return,1 end