Skip to content

Commit 9dee72d

Browse files
authored
add function sortCW and some comments
1 parent d790249 commit 9dee72d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

com/williamfiset/algorithms/geometry/ConvexPolygonCutWithLineSegment.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ private static int orientation(double ax, double ay, double bx, double by, doubl
8686
return cross < -EPS ? -1 : cross > EPS ? 1 : 0;
8787
}
8888

89+
//takes Pt[] as an argument and returns List<Pt>
8990
public static List<Pt> makeList(Pt[] squarePolygon){
9091
List<Pt> list = new ArrayList<Pt>();
9192
for (int i=0; i<squarePolygon.length; i++){
@@ -94,6 +95,7 @@ public static List<Pt> makeList(Pt[] squarePolygon){
9495
return list;
9596
}
9697

98+
//takes List<Pt> as an argument and returns Pt[]
9799
public static Pt[] makeArray(List<Pt> list){
98100
int l = list.size();
99101
Pt[] temp = new Pt[l];

0 commit comments

Comments
 (0)