Returns a clone of the minimum hyper point.

@param box spatial object
@return the minimum hyper point
180086
public static double[] getMin(SpatialComparable box) {
    final int dim = box.getDimensionality();
    double[] min = new double[dim];
    for(int i = 0; i < dim; i++) {
      min[i] = box.getMin(i);
    }
    return min;
  }
134201
@Pure
	public Point2d getPosition2D() {
		final Rectangle2d b = getBoundingBox();
		if (b == null) {
			return null;
		}
		return new Point2d(b.getCenterX(), b.getCenterY());
	}
21217
public BoundingBox getBoundingBox() {

		GeometryEnvelope envelope = null;

		long offset = 0;
		boolean hasResults = true;

		while (hasResults) {

			hasResults = false;

			FeatureResultSet resultSet = featureDao.queryForChunk(chunkLimit,
					offset);
			try {
				while (resultSet.moveToNext()) {
					hasResults = true;

					FeatureRow featureRow = resultSet.getRow();
					GeometryEnvelope featureEnvelope = featureRow
							.getGeometryEnvelope();
					if (featureEnvelope != null) {

						if (envelope == null) {
							envelope = featureEnvelope;
						} else {
							envelope = envelope.union(featureEnvelope);
						}

					}
				}
			} finally {
				resultSet.close();
			}

			offset += chunkLimit;
		}

		BoundingBox boundingBox = null;
		if (envelope != null) {
			boundingBox = new BoundingBox(envelope);
		}

		return boundingBox;
	}
345886
function randomInBox(box, v) {
    v = v || new Vector3();

    v.x = Math$1.randFloat(box.min.x, box.max.x);
    v.y = Math$1.randFloat(box.min.y, box.max.y);
    v.z = Math$1.randFloat(box.min.z, box.max.z);

    return v;
  }
170208
public IntersectionType intersectionType (Box box) {
        // exit quickly in cases where the bounding boxes don't overlap (equivalent to a separating
        // axis test using the axes of the box)
        if (!_bounds.intersects(box)) {
            return IntersectionType.NONE;
        }

        // consider each side of the frustum as a potential separating axis
        int ccount = 0;
        for (int ii = 0; ii < 6; ii++) {
            // determine how many vertices fall inside/outside the plane
            int inside = 0;
            Plane plane = _planes[ii];
            for (int jj = 0; jj < 8; jj++) {
                if (plane.distance(box.vertex(jj, _vertex)) <= 0f) {
                    inside++;
                }
            }
            if (inside == 0) {
                return IntersectionType.NONE;
            } else if (inside == 8) {
                ccount++;
            }
        }
        return (ccount == 6) ? IntersectionType.CONTAINS : IntersectionType.INTERSECTS;
    }
1112232
public AlignedBox3f toBoundingBoxWithCtrlPoints() {
		AlignedBox3f bb = this.logicalBounds==null ? null : this.logicalBounds.get();
		if (bb==null) {
			bb = new AlignedBox3f();
			buildLogicalBoundingBox(bb);
			this.logicalBounds = new SoftReference<>(bb);
		}
		return bb;
	}
939200
public TableColumn copyBox()
    {
        TableColumn ret = new TableColumn(el, g, ctx);
        ret.copyValues(this);
        return ret;
    }
676386
public Box fromPoints (IVector3... points) {
        setToEmpty();
        for (IVector3 point : points) {
            addLocal(point);
        }
        return this;
    }
816690
public Rectangle2D getBoundingBox() {
		Dimension glyphDimension = getMetrics().getGlyphDimension(getNotationContext());
		if (isStemUp()) {
			return new Rectangle2D.Double(
				(int)(getBase().getX()),
                stemYEnd,
				getWidth(),
				getStemBeginPosition().getY()-stemYEnd+glyphDimension.getHeight()/2);
		}
		else {
			return new Rectangle2D.Double(
				(int)(getBase().getX()),
				getStemBeginPosition().getY()-glyphDimension.getHeight()/2,
				getWidth(),
				stemYEnd-getStemBeginPosition().getY()+1+glyphDimension.getHeight()/2);
		}
	}
337794
public BoundingBox getBoundingBox() {
		BoundingBox boundingBox = null;
		if (minX != null && maxX != null && minY != null && maxY != null) {
			boundingBox = new BoundingBox(getMinX(), getMinY(), getMaxX(),
					getMaxY());
		}
		return boundingBox;
	}
367007
@ExportConstructor
	public static org.geomajas.geometry.Bbox constructor(double x, double y, double width, double height) {
		return new org.geomajas.geometry.Bbox(x, y, width, height);
	}
785141
public MultiPoint createMultiPoint(Point[] points) {
		if (points == null) {
			return new MultiPoint(srid, precision);
		}
		Point[] clones = new Point[points.length];
		for (int i = 0; i < points.length; i++) {
			clones[i] = (Point) points[i].clone();
		}
		return new MultiPoint(srid, precision, clones);
	}
39601
public static ArrayList<IGeoPoint> pointsAsRect(BoundingBox rectangle){
		ArrayList<IGeoPoint> points = new ArrayList<IGeoPoint>(4);
		points.add(new GeoPoint(rectangle.getLatNorth(), rectangle.getLonWest()));
		points.add(new GeoPoint(rectangle.getLatNorth(), rectangle.getLonEast()));
		points.add(new GeoPoint(rectangle.getLatSouth(), rectangle.getLonEast()));
		points.add(new GeoPoint(rectangle.getLatSouth(), rectangle.getLonWest()));
		return points;
	}
1281628
public static double volume(SpatialComparable box) {
    final int dim = box.getDimensionality();
    double vol = 1.;
    for(int i = 0; i < dim; i++) {
      double delta = box.getMax(i) - box.getMin(i);
      if(delta == 0.) {
        return 0.;
      }
      vol *= delta;
    }
    return vol;
  }
1355607
def get_bounding_box(points):
    
    assert len(points) > 0, "At least one point has to be given."
    min_x, max_x = points[0]['x'], points[0]['x']
    min_y, max_y = points[0]['y'], points[0]['y']
    for point in points:
        min_x, max_x = min(min_x, point['x']), max(max_x, point['x'])
        min_y, max_y = min(min_y, point['y']), max(max_y, point['y'])
    p1 = Point(min_x, min_y)
    p2 = Point(max_x, max_y)
    return BoundingBox(p1, p2)
587184
private Rectangle getCompleteBoxAllocation(Box b)
    {
        Rectangle ret = b.getAbsoluteBounds();
        if (b instanceof ElementBox)
        {
            ElementBox eb = (ElementBox) b;
            for (int i = eb.getStartChild(); i < eb.getEndChild(); i++)
            {
                Box child = eb.getSubBox(i);
                if (child.isVisible())
                {
                    Rectangle r = getCompleteBoxAllocation(child);
                    ret.add(r);
                }
            }
        }
        return ret.intersection(b.getClipBlock().getClippedContentBounds());
    }
188499
function BoundingBox3D( xMin , yMin , zMin , xMax , yMax , zMax ) {
	this.min = new Vector3D( xMin , yMin , zMin ) ;
	this.max = new Vector3D( xMax , yMax , zMax ) ;
}