src/bbox.c
void bbox_intersect(const struct bbox *b0, const struct bbox *b1,
                    struct bbox *b2)
{
    int i;

    b2->num_dims = b0->num_dims;
    for(i = 0; i < b0->num_dims; i++) {
        b2->lb.c[i] = max(b0->lb.c[i], b1->lb.c[i]);
        b2->ub.c[i] = min(b0->ub.c[i], b1->ub.c[i]);
    }
}
/*
  Compute the intersection of bounding boxes b0 and b1, and store it on
  b2. Implicit assumption: b0 and b1 intersect.
*/
Compute the intersection of bounding boxes b0 and b1, and store it on
b2. Implicit assumption: b0 and b1 intersect.
Compute the intersection of bounding boxes b0 and b1 and store it on b2 . Implicit assumption : b0 and b1 intersect .
void bbox_intersect(const struct bbox *b0, const struct bbox *b1,
                    struct bbox *b2)
{
    int i;
    b2->num_dims = b0->num_dims;
    for(i = 0; i < b0->num_dims; i++) {
        b2->lb.c[i] = max(b0->lb.c[i], b1->lb.c[i]);
        b2->ub.c[i] = min(b0->ub.c[i], b1->ub.c[i]);
    }
}
void bbox_intersect ( const struct bbox * b0 , const struct bbox * b1 , struct bbox * b2 ) { int i ; b2 -> num_dims = b0 -> num_dims ; for ( i = 0 ; i < b0 -> num_dims ; i ++ ) { b2 -> lb . c [ i ] = max ( b0 -> lb . c [ i ] , b1 -> lb . c [ i ] ) ; b2 -> ub . c [ i ] = min ( b0 -> ub . c [ i ] , b1 -> ub . c [ i ] ) ; } }
Compute the intersection of bounding boxes b0 and b1, and store it on
b2.
Compute the intersection of bounding boxes b0 and b1 and store it on b2 .