Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double vx = VelocityX;
- double vy = VelocityY;
- double d = sqrt(vy*vy + vx * vx);
- if (d == 0) d = 1;
- X += VelocityX / d * dt;
- Y += VelocityY / d * dt;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement