main/src/georegression/geometry/UtilPoint2D_F64.java
public static Rectangle2D_F64 bounding(List<Point2D_F64> points, Rectangle2D_F64 bounding) {
		if( bounding == null )
			bounding = new Rectangle2D_F64();

		double minX=Double.MAX_VALUE,maxX=-Double.MAX_VALUE;
		double minY=Double.MAX_VALUE,maxY=-Double.MAX_VALUE;

		for( int i = 0; i < points.size(); i++ ) {
			Point2D_F64 p = points.get(i);
			if( p.x < minX )
				minX = p.x;
			if( p.x > maxX )
				maxX = p.x;
			if( p.y < minY )
				minY = p.y;
			if( p.y > maxY )
				maxY = p.y;
		}

		bounding.set(minX,minY,maxX,maxY);

		return bounding;
	}
public static Rectangle2D_F64 bounding(List<Point2D_F64> points, Rectangle2D_F64 bounding) {
		if( bounding == null )
			bounding = new Rectangle2D_F64();

		double minX=Double.MAX_VALUE,maxX=-Double.MAX_VALUE;
		double minY=Double.MAX_VALUE,maxY=-Double.MAX_VALUE;

		for( int i = 0; i < points.size(); i++ ) {
			Point2D_F64 p = points.get(i);
			if( p.x < minX )
				minX = p.x;
			if( p.x > maxX )
				maxX = p.x;
			if( p.y < minY )
				minY = p.y;
			if( p.y > maxY )
				maxY = p.y;
		}

		bounding.set(minX,minY,maxX,maxY);

		return bounding;
	}
public static Rectangle2D_F64 bounding ( List < Point2D_F64 > points , Rectangle2D_F64 bounding ) { if ( bounding == null ) bounding = new Rectangle2D_F64 ( ) ; double minX = Double . MAX_VALUE , maxX = - Double . MAX_VALUE ; double minY = Double . MAX_VALUE , maxY = - Double . MAX_VALUE ; for ( int i = 0 ; i < points . size ( ) ; i ++ ) { Point2D_F64 p = points . get ( i ) ; if ( p . x < minX ) minX = p . x ; if ( p . x > maxX ) maxX = p . x ; if ( p . y < minY ) minY = p . y ; if ( p . y > maxY ) maxY = p . y ; } bounding . set ( minX , minY , maxX , maxY ) ; return bounding ; }
Finds the minimal volume {@link georegression.struct.shapes.RectangleLength2D_F64} which contains all the points.

@param points Input: List of points.
@param bounding Output: Bounding rectangle
Finds the minimal volume { @link georegression . struct . shapes . RectangleLength2D_F64 } which contains all the points .