Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 5
- y = 30
- xx = 50
- yy = 10
- time = 100ms
- distx = xx - x 50
- disty = yy - y -20
- velx = distx / time 0.5
- vely = disty / time -0.2
- x1 = x
- y1 = y
- while (x1 != xx && y1 =! yy)
- if x1 != xx
- x1 = x1 + velx
- if y1 != yy
- y1 = y1 + vely
- move window to x1,y1
- sleep 1 ms
- loop
Add Comment
Please, Sign In to add comment