Advertisement
toxictype

Untitled

Mar 25th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.15 KB | None | 0 0
  1. double vx = VelocityX;
  2.     double vy = VelocityY;
  3.     double d = sqrt(vy*vy + vx * vx);
  4.     if (d == 0) d = 1;
  5.     X += VelocityX / d * dt;
  6.     Y += VelocityY / d * dt;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement