Fix blink bug

This commit is contained in:
2022-10-19 23:17:26 +01:00
parent 4ad19aa19d
commit 21dc670c9f
13 changed files with 353 additions and 312 deletions
+11
View File
@@ -101,6 +101,17 @@ mvPointTowardAtSpeed
mvPointTowardAtSpeed !speed !ep !p
| dist p ep < speed = ep
| otherwise = p +.+ speed *.* normalizeV (ep -.- p)
{- | given a target and a start point, shift toward the end point by a given
amount.
If close enough, go past the end point -}
mvPointAlongAtSpeed
:: Float -- ^ Speed.
-> Point2 -- ^ End point.
-> Point2 -- ^ Start point.
-> Point2
mvPointAlongAtSpeed !speed !ep !p
| dist p ep == 0 = ep
| otherwise = p +.+ speed *.* normalizeV (ep -.- p)
{- | given a target and a start point, shift toward the end point by 1.
If close enough, end up on the end point -}
mvPointToward