Improve prettiness further

This commit is contained in:
hasufell 2014-11-16 04:49:13 +01:00
parent 9c7acc6dce
commit 62583d82a5
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
2 changed files with 12 additions and 12 deletions

View File

@ -119,10 +119,10 @@ grahamCHSteps c xs' ys' = take c . scanH xs' $ ys'
-- |Get all iterations of the upper hull of the graham scan algorithm.
grahamUHSteps :: [PT] -> [[PT]]
grahamUHSteps vs =
(++) [getLastX 2 . sortedXY $ vs] .
rmdups .
grahamCHSteps ((* 2) . length $ vs) uH $
uHRest
(++) [getLastX 2 . sortedXY $ vs]
. rmdups
. grahamCHSteps ((* 2) . length $ vs) uH
$ uHRest
where
(uH, uHRest) = first reverse . splitAt 3 . reverse . sortedXY $ vs
@ -130,9 +130,9 @@ grahamUHSteps vs =
-- |Get all iterations of the lower hull of the graham scan algorithm.
grahamLHSteps :: [PT] -> [[PT]]
grahamLHSteps vs =
(++) [take 2 . sortedXY $ vs] .
rmdups .
grahamCHSteps ((* 2) . length $ vs) lH $
lHRest
(++) [take 2 . sortedXY $ vs]
. rmdups
. grahamCHSteps ((* 2) . length $ vs) lH
$ lHRest
where
(lH, lHRest) = first reverse . splitAt 3 . sortedXY $ vs