Small optimisations
This commit is contained in:
+4
-1
@@ -251,7 +251,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:b:c:as) = a : intercalate [a] (zipWith (\x y->[x,y]) (b:c:as) (c:as))
|
||||
polyToTris (a:as) = f a as
|
||||
where
|
||||
f x (y:z:ys) = x : y : z : f x (z:ys)
|
||||
f _ _ = []
|
||||
polyToTris _ = []
|
||||
|
||||
-- | Return n equidistant points on a circle with a radius of 600.
|
||||
|
||||
Reference in New Issue
Block a user