Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. GetDistanceX() {
  2. global X
  3. global destination
  4. if (X >= 0) {
  5. if (destination >= 0) {
  6. if (destination > X) {
  7. distance:=destination-X
  8. }
  9. if (destination < X) {
  10. distance:=X-destination
  11. }
  12. }
  13. if (destination < 0) {
  14. distance:=destination-X
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement