Implement poking using Verx lists
This commit is contained in:
+3
-3
@@ -255,10 +255,10 @@ anyPolyssIntersect x y = or $ polysIntersect <$> x <*> y
|
||||
-- split a list into triples, forms triangles from a polygon
|
||||
polyToTris :: [s] -> [s]
|
||||
{-# INLINE polyToTris #-}
|
||||
polyToTris (a:as) = f a as
|
||||
polyToTris (a:as) = go a as
|
||||
where
|
||||
f x (y:z:ys) = x : y : z : f x (z:ys)
|
||||
f _ _ = []
|
||||
go !x (y:z:ys) = x : y : z : go x (z:ys)
|
||||
go _ _ = []
|
||||
polyToTris _ = []
|
||||
|
||||
-- | Return n equidistant points on a circle with a radius of 600.
|
||||
|
||||
Reference in New Issue
Block a user