Fix blink bug
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user