pub fn bnd2_intersect_bnd2i(b1: &Bounds2i, b2: &Bounds2i) -> Bounds2i {
    Bounds2i {
        p_min: Point2i {
            x: std::cmp::max(b1.p_min.x, b2.p_min.x),
            y: std::cmp::max(b1.p_min.y, b2.p_min.y),
        },
        p_max: Point2i {
            x: std::cmp::min(b1.p_max.x, b2.p_max.x),
            y: std::cmp::min(b1.p_max.y, b2.p_max.y),
        },
    }
}
/// The intersection of two bounding boxes can be found by computing
/// the maximum of their two respective minimum coordinates and the
/// minimum of their maximum coordinates.
The intersection of two bounding boxes can be found by computing
the maximum of their two respective minimum coordinates and the
minimum of their maximum coordinates.
The intersection of two bounding boxes can be found by computing the maximum of their two respective minimum coordinates and the minimum of their maximum coordinates .
pub fn bnd2_intersect_bnd2i(b1: &Bounds2i, b2: &Bounds2i) -> Bounds2i {
    Bounds2i {
        p_min: Point2i {
            x: std::cmp::max(b1.p_min.x, b2.p_min.x),
            y: std::cmp::max(b1.p_min.y, b2.p_min.y),
        },
        p_max: Point2i {
            x: std::cmp::min(b1.p_max.x, b2.p_max.x),
            y: std::cmp::min(b1.p_max.y, b2.p_max.y),
        },
    }
}
pub fn bnd2_intersect_bnd2i ( b1 : & Bounds2i , b2 : & Bounds2i ) -> Bounds2i { Bounds2i { p_min : Point2i { x : std :: cmp :: max ( b1 . p_min . x , b2 . p_min . x ) , y : std :: cmp :: max ( b1 . p_min . y , b2 . p_min . y ) , } , p_max : Point2i { x : std :: cmp :: min ( b1 . p_max . x , b2 . p_max . x ) , y : std :: cmp :: min ( b1 . p_max . y , b2 . p_max . y ) , } , } }
The intersection of two bounding boxes can be found by computing
the maximum of their two respective minimum coordinates and the
minimum of their maximum coordinates.
The intersection of two bounding boxes can be found by computing the maximum of their two respective minimum coordinates and the minimum of their maximum coordinates .
b1
&Bounds2i
b2
&Bounds2i