Simplify doorMechanism (involves hack)

This commit is contained in:
2022-06-23 11:00:25 +01:00
parent 8e3f03637d
commit 4c8c82b55c
3 changed files with 19 additions and 17 deletions
+4
View File
@@ -125,6 +125,10 @@ mvPointToward !ep !p
| dist p ep < 1 = ep
| otherwise = p +.+ normalizeV (ep -.- p)
vecBetweenSpeed :: Float -> Point2 -> Point2 -> Point2
vecBetweenSpeed s sp ep
| dist sp ep < s = ep -.- sp
| otherwise = s *.* normalizeV (ep -.- sp)
sigmoid :: Floating a => a -> a
sigmoid x = x/sqrt(1+x^(2::Int))