Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int i;
- double a,b,r,c,d,e,f,m,x,y;
- Object incoming(double[][] n, double v, double w, double h) {
- for(;x==0;x = r<d ? r : y<f ? d : 0){
- c=n[i][0];
- e=n[i][1];
- d=n[++i][0];
- f=n[i][1];
- m = (f-e)/(d-c);
- a = 4.9/v/v;
- b = m-w/v;
- r = (Math.sqrt(b*b-4*a*(f-h-m*d))-b)/2/a;
- y = h + w/v*d - a*d*d;
- }
- return new double[]{ x, x-d != 0 ? m*(x-d)+f : y };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement