Add ngon rooms

This commit is contained in:
2021-11-20 20:17:05 +00:00
parent 454e702dc9
commit 48cd59069c
3 changed files with 26 additions and 6 deletions
+3 -3
View File
@@ -462,9 +462,9 @@ chainPairs xs = zip xs $ tail xs
-- | Given a list of points, returns pairs of points linking the points into a
-- loop.
loopPairs :: [Point2] -> [(Point2,Point2)]
loopPairs [] = error "tried to make loop with empty list of points"
loopPairs [_] = error "tried to make loop with singleton list of points"
loopPairs :: [a] -> [(a,a)]
loopPairs [] = error "tried to make loop with empty list of elements"
loopPairs [_] = error "tried to make loop with singleton list of elements"
loopPairs (x:xs) = zip (x:xs) (xs ++ [x])
-- | Test whether a point is in a cone.
-- Note the pair is ordered.