Simplify analyser machines somewhat
This commit is contained in:
@@ -63,9 +63,9 @@ pointInOrOnPolygon _ _ = undefined
|
||||
{- | Test whether a point is strictly inside a polygon.
|
||||
Supposes the points in the polygon are listed in anticlockwise order.
|
||||
-}
|
||||
pointInPolygon :: Point2 -> [Point2] -> Bool
|
||||
pointInPolygon !p (x : xs) = all (\l -> uncurry isLHS l p) $ zip (x : xs) (xs ++ [x])
|
||||
pointInPolygon _ [] = False
|
||||
pointInPoly :: Point2 -> [Point2] -> Bool
|
||||
pointInPoly !p (x : xs) = all (\l -> uncurry isLHS l p) $ zip (x : xs) (xs ++ [x])
|
||||
pointInPoly _ [] = False
|
||||
|
||||
circInPolygon :: Point2 -> Float -> [Point2] -> Bool
|
||||
circInPolygon !p !r (x : xs) = all f $ zip (x : xs) (xs ++ [x])
|
||||
|
||||
Reference in New Issue
Block a user