Skip to main content

rects_overlap

Function rects_overlap 

Source
pub(crate) fn rects_overlap(
    a: (i32, i32, i32, i32),
    b: (i32, i32, i32, i32),
) -> bool
Expand description

True when the rectangles (x, y, w, h) overlap: strict interior intersection, so touching edges do not count and empty (non-positive-dimension) rectangles never overlap anything. Arithmetic is widened so extreme coordinates cannot wrap.