コード例 #1
0
ファイル: Polygon2D.java プロジェクト: wjsrobertson/j2menace
 /**
  * Creates a new instance of Polygon2D with vertices with the same values as the {@code p}
  * parameter.
  *
  * @param polygon The polygon to copy
  */
 public Polygon2D(Polygon2D polygon) {
   for (Enumeration e = polygon.vertices(); e.hasMoreElements(); ) {
     addVertex(new Vector2D((Vector2D) e.nextElement()));
   }
 }