From bdd14c35996e64e72ed075f66aae66a21386d748 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 11 Mar 2013 16:00:47 +0100 Subject: Algorithms-I : 3-Collinear: fix slope order --- Algorithms/Part-I/3-Collinear/Point.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Algorithms/Part-I') diff --git a/Algorithms/Part-I/3-Collinear/Point.java b/Algorithms/Part-I/3-Collinear/Point.java index bd5bbe7..7307d04 100644 --- a/Algorithms/Part-I/3-Collinear/Point.java +++ b/Algorithms/Part-I/3-Collinear/Point.java @@ -60,7 +60,7 @@ public class Point implements Comparable { double sq = slopeTo(q); if (sp < sq) return -1; if (sp > sq) return 1; - return 0; + return p.compareTo(q); } } -- cgit v1.2.3