Fix bug in detecting which room you are in
This commit is contained in:
+1
-1
@@ -133,7 +133,7 @@ convexHull :: [Point2] -> [Point2]
|
||||
convexHull (x:y:z:xs) = grahamScan $ orderAroundFirst $ sortOn (\(V2 a b) -> (b,a)) (x:y:z:xs)
|
||||
convexHull _ = error "Tried to create the convex hull of two or fewer points"
|
||||
-- | Creates the convex hull of a set of points.
|
||||
-- Need to verify whether or not this is ordered
|
||||
-- it appears that the output may NOT be ordered
|
||||
convexHullSafe :: [Point2] -> [Point2]
|
||||
convexHullSafe (x:y:z:xs) = grahamScan $ orderAroundFirst $ sortOn (\(V2 a b) -> (b,a)) (x:y:z:xs)
|
||||
convexHullSafe _ = []
|
||||
|
||||
Reference in New Issue
Block a user