Guest User

Untitled

a guest
Apr 22nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. x = 5
  2. y = 30
  3.  
  4. xx = 50
  5. yy = 10
  6.  
  7. time = 100ms
  8.  
  9. distx = xx - x 50
  10. disty = yy - y -20
  11.  
  12. velx = distx / time 0.5
  13. vely = disty / time -0.2
  14.  
  15. x1 = x
  16. y1 = y
  17.  
  18. while (x1 != xx && y1 =! yy)
  19.  
  20. if x1 != xx
  21. x1 = x1 + velx
  22.  
  23. if y1 != yy
  24. y1 = y1 + vely
  25.  
  26. move window to x1,y1
  27.  
  28. sleep 1 ms
  29.  
  30. loop
Add Comment
Please, Sign In to add comment