Cleanup Action datatypes, clear sel set if scroll different section
This commit is contained in:
@@ -264,7 +264,7 @@ circHitWall sp ep r w =
|
||||
xep = ep + x
|
||||
|
||||
-- | note that this does not push the circle away from the wall at all
|
||||
collideCircWalls :: Point2 -> Point2 -> Float -> [Wall] -> (Point2, Maybe Wall)
|
||||
collideCircWalls :: Foldable t => Point2 -> Point2 -> Float -> t Wall -> (Point2, Maybe Wall)
|
||||
{-# INLINE collideCircWalls #-}
|
||||
collideCircWalls sp ep rad = foldl' findPoint (ep, Nothing)
|
||||
where
|
||||
@@ -275,14 +275,11 @@ collideCircWalls sp ep rad = foldl' findPoint (ep, Nothing)
|
||||
. _wlLine
|
||||
$ wl
|
||||
shiftbyrad (a, b) =
|
||||
bimap
|
||||
f
|
||||
f
|
||||
( a +.+ rad *.* normalizeV (a -.- b)
|
||||
, b +.+ rad *.* normalizeV (b -.- a)
|
||||
( f $ a + rad *^ normalizeV (a - b)
|
||||
, f $ b + rad *^ normalizeV (b - a)
|
||||
)
|
||||
where
|
||||
f = (+.+) (rad *.* normalizeV (vNormal $ a -.- b))
|
||||
f = (+ rad *^ normalizeV (vNormal $ a - b))
|
||||
|
||||
overlapCircWallsClosest :: Point2 -> Float -> [Wall] -> Maybe (Point2, Wall)
|
||||
{-# INLINE overlapCircWallsClosest #-}
|
||||
|
||||
Reference in New Issue
Block a user