Move debug flags to config, various perf improvements
This commit is contained in:
+7
-7
@@ -281,13 +281,13 @@ collideCircWalls'' p1 p2 rad ws
|
||||
|
||||
-- | Looks for first collision of a point with a list of lines.
|
||||
-- If found, gives point and normal of wall.
|
||||
collidePointLines :: Point2 -> Point2 -> [Wall'] -> Maybe (Point2,Point2)
|
||||
collidePointLines p1 p2 ws
|
||||
= safeMinimumOn f
|
||||
$ mapMaybe (( \(x,y) -> intersectSegSeg p1 p2 x y <&> ( , vNormal $ x -.- y ) )
|
||||
. _wlLine') ws
|
||||
where
|
||||
f (a,_) = magV (p1 -.- a)
|
||||
--collidePointLines :: Point2 -> Point2 -> [Wall'] -> Maybe (Point2,Point2)
|
||||
--collidePointLines p1 p2 ws
|
||||
-- = safeMinimumOn f
|
||||
-- $ mapMaybe (( \(x,y) -> intersectSegSeg p1 p2 x y <&> ( , vNormal $ x -.- y ) )
|
||||
-- . _wlLine') ws
|
||||
-- where
|
||||
-- f (a,_) = magV (p1 -.- a)
|
||||
|
||||
-- | Looks for first collision of a point with walls.
|
||||
-- If found, gives point and normal of wall.
|
||||
|
||||
Reference in New Issue
Block a user