Advertisement
codex01

Untitled

Aug 30th, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. private Vector getVectorForPoints(Location l1, Location l2) {
  2. double g = -0.08;
  3. double d = l2.distance(l1);
  4. double t = d;
  5. double vX = (1.0+0.07*t) * (l2.getX() - l1.getX())/t;
  6. double vY = (1.0+0.03*t) * (l2.getY() - l1.getY())/t - 0.5*g*t;
  7. double vZ = (1.0+0.07*t) * (l2.getZ() - l1.getZ())/t;
  8. return new Vector(vX, vY, vZ);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement