Bouncing ball intro page javascript.
Our web spider found the following code snippet at www_hypergurl_com and contains information about atan2 and JavaScript.
atan2(ay,ax)*180/Math.PI;
if (A[i] < 0) A[i]+=360;
//Shortest distance between centre's of stationary and moving balls!!
dx=TY-PY[i];
dy=TX-PX[i];
DS[i]=Math.sqrt(dx*dx+dy*dy);
FDS[i] = Math.floor(DS[i]);
Q[i]=(FDS[i]-CR[i]);
if (Q[i] < 0) Q[i]=0;
//The following is based on a standard line/circle intersection routine. 
B[i]=R1/R2+1;
CY[i]=PY[i]-(DS[i]/B[i])*Math.sin(A[i]*Math.PI/180);
CX[i]=PX[i]-(DS[i]/B[i])*Math.cos(A[i]*Math.PI/180);
//Line start point!! 
p1y[i]=CY[i];
p1x[i]=CX[i];
//Line end point!!
p2y[i]=CY[i]+1*Math.sin(D[i]*Math.PI/180);
p2x[i]=CX[i]+1*Math.cos(D[i]*Math.PI/180);
L[i]=(p2x[i]-p1x[i])*(p2x[i]-p1x[i])+(p2y[i]-p1y[i])*(p2y[i]-p1y[i]);
//Travelling towards if SH is less than zero.
SH[i]=2*((p2x[i]-p1x[i])*(p1x[i
Read the entire article....