lib/geometry: do not sort points as it invalidates the shape of the polygon
authorAlexis Laferrière <alexis.laf@xymus.net>
Mon, 22 Feb 2016 17:39:03 +0000 (12:39 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Tue, 23 Feb 2016 17:25:28 +0000 (12:25 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/geometry/polygon.nit

index 039fb94..94ad1c9 100644 (file)
@@ -444,7 +444,6 @@ end
 # Useful for converting a concave polygon into multiple convex ones
 fun triangulate(pts: Array[Point[Float]], results: Array[ConvexPolygon]) do
        var poly = new Polygon(pts)
-       poly.sort_ccw
        pts = poly.points
        recursive_triangulate(pts, results)
 end