diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2013-03-11 16:00:47 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2013-11-15 17:38:44 +0100 |
commit | bdd14c35996e64e72ed075f66aae66a21386d748 (patch) | |
tree | 053a2c2f6bdbc42e4052801a8e1f242685b9e805 /Algorithms/Part-I/3-Collinear/Point.java | |
parent | af56ef8708c749b9eeee220c8fa6bc729f9380f7 (diff) | |
download | coursera-bdd14c35996e64e72ed075f66aae66a21386d748.zip coursera-bdd14c35996e64e72ed075f66aae66a21386d748.tar.gz |
Algorithms-I : 3-Collinear: fix slope order
Diffstat (limited to 'Algorithms/Part-I/3-Collinear/Point.java')
-rw-r--r-- | Algorithms/Part-I/3-Collinear/Point.java | 2 |
1 files changed, 1 insertions, 1 deletions
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<Point> { double sq = slopeTo(q); if (sp < sq) return -1; if (sp > sq) return 1; - return 0; + return p.compareTo(q); } } |