Improve intersection test--fails sometimes
This commit is contained in:
+3
-3
@@ -72,9 +72,9 @@ blank = []
|
||||
|
||||
polygon :: [Point2] -> Picture
|
||||
{-# INLINE polygon #-}
|
||||
polygon ps = map (f . zeroZ) $ polyToTris ps
|
||||
polygon ps = map f $ polyToTris ps
|
||||
where
|
||||
f pos = Verx pos black [] 0 polyNum
|
||||
f (V2 x y) = Verx (V3 x y 0) black [] 0 polyNum
|
||||
|
||||
polygonZ :: [Point2] -> Float -> Picture
|
||||
{-# INLINE polygonZ #-}
|
||||
@@ -191,7 +191,7 @@ scale3 a b (V3 x y z) = V3 (x*a) (y*b) z
|
||||
scale :: Float -> Float -> Picture -> Picture
|
||||
{-# INLINE scale #-}
|
||||
--scale x y = map . second . overPos $ scale3 x y
|
||||
scale x y = map $ overPos $ scale3 x y
|
||||
scale x = map . overPos . scale3 x
|
||||
|
||||
rotate :: Float -> Picture -> Picture
|
||||
{-# INLINE rotate #-}
|
||||
|
||||
Reference in New Issue
Block a user