POLYINT: improve haddock doc

This commit is contained in:
hasufell 2014-10-26 14:58:43 +01:00
parent d56d22036c
commit d81b6b1cec
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
1 changed files with 6 additions and 4 deletions

View File

@ -50,7 +50,9 @@ sortLexPoly ps = maybe [] (`shiftM` ps) (elemIndex (yMax ps) ps)
-- |Make a PolyPT list out of a regular list of points, so
-- the predecessor and successors are all saved.
mkPolyPTList :: (PT -> PT -> PT -> PolyPT) -> [PT] -> [PolyPT]
mkPolyPTList :: (PT -> PT -> PT -> PolyPT) -- ^ PolyA or PolyB function
-> [PT] -- ^ polygon points
-> [PolyPT]
mkPolyPTList f' pts@(x':y':_:_) =
f' x' (last pts) y' : go f' pts
where
@ -71,9 +73,9 @@ sortLexPolys (pA'@(_:_), pB'@(_:_)) =
-- Traverse predecessor and successor and insert them in the right
-- order into the resulting queue.
-- We start at the max y-coordinates of both polygons.
go :: BankersDequeue PolyPT
-> BankersDequeue PolyPT
-> BankersDequeue PolyPT
go :: BankersDequeue PolyPT -- polyA
-> BankersDequeue PolyPT -- polyB
-> BankersDequeue PolyPT -- sorted queue
go pA pB
-- Nothing to sort.
| Q.null pA && Q.null pB = Q.empty