Stop inanimate objects from opening walls

This commit is contained in:
jgk
2021-03-29 13:36:03 +02:00
parent 502832b2b8
commit a4afe05478
8 changed files with 76 additions and 59 deletions
+1
View File
@@ -150,6 +150,7 @@ circOnLine' !p1 !p2 !c !rad = isJustTrue (fmap (\p -> magV (p -.- c) < rad) y)
isJustTrue (Just True) = True
isJustTrue _ = False
-- this should probably be circOnSeg
circOnLine :: Point2 -> Point2 -> Point2 -> Float -> Bool
circOnLine !p1 !p2 !c !rad = magV (p1 -.- c) <= rad || magV (p2 -.- c) <= rad
|| isJustTrue (fmap (\p -> magV (p -.- c) < rad) y)