Implement (broken) push away from walls according to muzzle pos

This commit is contained in:
2026-01-01 11:10:00 +00:00
parent 5b5a12be6e
commit 0a8725f68d
7 changed files with 411 additions and 348 deletions
+7 -3
View File
@@ -1,6 +1,5 @@
module Bound (
boundPoints,
) where
module Bound (boundPoints
,boundPointsRect) where
import qualified Control.Foldl as L
import Control.Lens
@@ -20,3 +19,8 @@ boundPoints =
)
where
f (mn, ms, me, mw) = (,,,) <$> mn <*> ms <*> me <*> mw
boundPointsRect :: [Point2] -> Maybe (Point2,Point2)
boundPointsRect ps = do
(n,s,e,w) <- boundPoints ps
return (V2 w s, V2 e n)