ALGO: use isInsidePoly

This commit is contained in:
2015-01-09 03:20:13 +01:00
parent 5b092715aa
commit c96474e6fd
2 changed files with 10 additions and 5 deletions

View File

@@ -24,3 +24,12 @@ polySegments p@(x':_:_:_) = go p ++ [(last p, x')]
go (x:y:xs) = (x, y) : go (y:xs)
go _ = []
polySegments _ = []
isInsidePoly :: [PT] -> Segment -> Bool
isInsidePoly pts seg =
null
. catMaybes
. fmap (intersectSeg'' seg)
$ polySegments pts