/// Given two bounding boxes, compute and return a new `BBox` that encompasses
/// both spaces the original two boxes encompassed.
Given two bounding boxes, compute and return a new `BBox` that encompasses
both spaces the original two boxes encompassed.
Given two bounding boxes compute and return a new ` BBox ` that encompasses both spaces the original two boxes encompassed .
pub fn union_bbox(b1: &BBox, b2: &BBox) -> BBox {
    BBox {
        min: Vec3 {
            x: b1.min.x.min(b2.min.x),
            y: b1.min.y.min(b2.min.y),
            z: b1.min.z.min(b2.min.z)
        },
        max: Vec3 {
            x: b1.max.x.max(b2.max.x),
            y: b1.max.y.max(b2.max.y),
            z: b1.max.z.max(b2.max.z)
        }
    }
}
pub fn union_bbox ( b1 : & BBox , b2 : & BBox ) -> BBox { BBox { min : Vec3 { x : b1 . min . x . min ( b2 . min . x ) , y : b1 . min . y . min ( b2 . min . y ) , z : b1 . min . z . min ( b2 . min . z ) } , max : Vec3 { x : b1 . max . x . max ( b2 . max . x ) , y : b1 . max . y . max ( b2 . max . y ) , z : b1 . max . z . max ( b2 . max . z ) } } }
Given two bounding boxes, compute and return a new `BBox` that encompasses
both spaces the original two boxes encompassed.
Given two bounding boxes compute and return a new ` BBox ` that encompasses both spaces the original two boxes encompassed .
b1
&BBox
b2
&BBox