Implement (broken) push away from walls according to muzzle pos
This commit is contained in:
+7
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user