main/src/georegression/geometry/UtilPolygons2D_F64.java
public static void convert( Rectangle2D_F64 input , Polygon2D_F64 output ) {
		if (output.size() != 4)
			throw new IllegalArgumentException("polygon of order 4 expected");

		output.get(0).set(input.p0.x, input.p0.y);
		output.get(1).set(input.p1.x, input.p0.y);
		output.get(2).set(input.p1.x, input.p1.y);
		output.get(3).set(input.p0.x, input.p1.y);
	}
public static void convert( Rectangle2D_F64 input , Polygon2D_F64 output ) {
		if (output.size() != 4)
			throw new IllegalArgumentException("polygon of order 4 expected");

		output.get(0).set(input.p0.x, input.p0.y);
		output.get(1).set(input.p1.x, input.p0.y);
		output.get(2).set(input.p1.x, input.p1.y);
		output.get(3).set(input.p0.x, input.p1.y);
	}
public static void convert ( Rectangle2D_F64 input , Polygon2D_F64 output ) { if ( output . size ( ) != 4 ) throw new IllegalArgumentException ( "polygon of order 4 expected" ) ; output . get ( 0 ) . set ( input . p0 . x , input . p0 . y ) ; output . get ( 1 ) . set ( input . p1 . x , input . p0 . y ) ; output . get ( 2 ) . set ( input . p1 . x , input . p1 . y ) ; output . get ( 3 ) . set ( input . p0 . x , input . p1 . y ) ; }
Converts a rectangle into a polygon

@param input Rectangle.
@param output Polygon2D_F64.  Modified.
Converts a rectangle into a polygon