VEC: add sortedYX

This commit is contained in:
hasufell 2015-01-08 01:39:23 +01:00
parent ede0d6eccf
commit 4385ef127b
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
1 changed files with 5 additions and 0 deletions

View File

@ -140,6 +140,11 @@ sortedXY :: [PT] -> [PT]
sortedXY = fmap p2 . sortLex . fmap unp2
-- |Sort Y and X coordinates lexicographically.
sortedYX :: [PT] -> [PT]
sortedYX = fmap p2 . sortLexSwapped . fmap unp2
-- |Sort all points according to their X-coordinates only.
sortedX :: [PT] -> [PT]
sortedX xs =