Cleanup and various bugfixes

This commit is contained in:
2021-11-16 21:31:53 +00:00
parent ebe9ad6b90
commit 5d0b48829c
12 changed files with 103 additions and 39 deletions
+1 -1
View File
@@ -163,7 +163,7 @@ grahamScan = foldr push []
-- https://codereview.stackexchange.com/questions/206019/graham-scan-algorithm-in-haskell
grahamEliminate :: [Point2] -> [Point2]
grahamEliminate (x:y:z:xs)
| isRHS x y z = grahamEliminate (x:z:xs)
| not $ isLHS x y z = grahamEliminate (x:z:xs)
grahamEliminate xs = xs
-- | Return midpoint between two points.