|
|
вернуться в форумCan you help me? Послано Tony 16 окт 2002 16:21 If you know Xi,Yi,Xj,Yj,Xk,Yk,can you calc the <ijk ( < mean jiao ). if you can,write it to me.Thanks! Yes,I can. var xi,xj,xk,yi,yj,yk,j1,j2,jiao:real; begin readln(xi,yi,xj,yj,xk,yk); if yi=yj then j1:=90 else j1:=arctan(abs(xj-xi)/abs(yj-yi))/pi*180; if xj>xi then j1:=360-j1; if yj>yi then j1:=180-j1; if j1<0then j1:=j1+360; if yk=yj then j2:=90 else j2:=arctan(abs(xj-xk)/abs(yj-yk))/pi*180; if xj>xk then j2:=360-j2; if yj>yk then j2:=180-j2; if j2<0then j2:=j2+360; jiao:=abs(j1-j2); if jiao>180then jiao:=360-jiao; {jiao is <IJK.}writeln(jiao:0:8) end. |
|
|