Continue to refactor zoning to be more stream-based
This commit is contained in:
@@ -29,6 +29,7 @@ import Geometry.LHS
|
||||
import ListHelp
|
||||
--import Geometry.ConvexPoly
|
||||
|
||||
import qualified Data.Set as S
|
||||
--import Data.Maybe
|
||||
--import Data.List
|
||||
-- | Return a point a distance away from a first point towards a second point.
|
||||
@@ -122,6 +123,10 @@ angleBetween v1 v2 = argV v1 - argV v2
|
||||
doublePair :: (a,a) -> [(a,a)]
|
||||
doublePair (x,y) = [(x,y),(y,x)]
|
||||
|
||||
-- this shouldn't be here
|
||||
doublePairSet :: Ord a => (a,a) -> S.Set (a,a)
|
||||
doublePairSet (x,y) = S.fromList [(x,y),(y,x)]
|
||||
|
||||
doubleV2 :: V2 a -> [V2 a]
|
||||
doubleV2 (V2 x y) = [V2 x y,V2 y x]
|
||||
-- split a list into triples, forms triangles from a polygon
|
||||
|
||||
Reference in New Issue
Block a user