Advertisement
Guest User

Untitled

a guest
Oct 21st, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. int i;
  2. double a,b,r,c,d,e,f,m,x,y;
  3. Object incoming(double[][] n, double v, double w, double h) {
  4. for(;x==0;x = r<d ? r : y<f ? d : 0){
  5. c=n[i][0];
  6. e=n[i][1];
  7. d=n[++i][0];
  8. f=n[i][1];
  9.  
  10. m = (f-e)/(d-c);
  11.  
  12. a = 4.9/v/v;
  13. b = m-w/v;
  14. r = (Math.sqrt(b*b-4*a*(f-h-m*d))-b)/2/a;
  15. y = h + w/v*d - a*d*d;
  16.  
  17. }
  18.  
  19. return new double[]{ x, x-d != 0 ? m*(x-d)+f : y };
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement