public static ModifiableHyperBoundingBox union(SpatialComparable box1,SpatialComparable box2){
  final int dim=assertSameDimensionality(box1,box2);
  double[] min=new double[dim];
  double[] max=new double[dim];
  for (int i=0; i < dim; i++) {
    min[i]=Math.min(box1.getMin(i),box2.getMin(i));
    max[i]=Math.max(box1.getMax(i),box2.getMax(i));
  }
  return new ModifiableHyperBoundingBox(min,max);
}

public static ModifiableHyperBoundingBox union ( SpatialComparable box1 , SpatialComparable box2 ) { final int dim = assertSameDimensionality ( box1 , box2 ) ; double [ ] min = new double [ dim ] ; double [ ] max = new double [ dim ] ; for ( int i = 0 ; i < dim ; i ++ ) { min [ i ] = Math . min ( box1 . getMin ( i ) , box2 . getMin ( i ) ) ; max [ i ] = Math . max ( box1 . getMax ( i ) , box2 . getMax ( i ) ) ; } return new ModifiableHyperBoundingBox ( min , max ) ; }
computes the union hyperboundingbox of two spatialcomparables .
