Cleanup Action datatypes, clear sel set if scroll different section

This commit is contained in:
2026-05-10 23:32:59 +01:00
parent dfb451c450
commit b213525c21
11 changed files with 276 additions and 206 deletions
+4 -7
View File
@@ -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 #-}