Split autodoor module

This commit is contained in:
jgk
2021-03-06 13:12:18 +01:00
parent e9eed18666
commit 36bccebed9
6 changed files with 164 additions and 115 deletions
+10
View File
@@ -750,3 +750,13 @@ wallsLOS !ls !c !p = all (\l -> wallLOS l c p) ls
translateDrawing = translate
rotateDrawing = rotate
mvPointTowardAtSpeed :: Float -> Point2 -> Point2 -> Point2
mvPointTowardAtSpeed speed !ep !p
| dist p ep < speed = ep
| otherwise = p +.+ speed *.* normalizeV (ep -.- p)
mvPointToward :: Point2 -> Point2 -> Point2
mvPointToward !ep !p | dist p ep < 1 = ep
| otherwise = p +.+ normalizeV (ep -.- p)