if(x1>x3) {wrt=atan((y1-y3)/(x1-x3));} if(x1<=x3) {wrt=pi+atan((y1-y3)/(x1-x3));} if(x1==x3]&&y1>=y3) {wtr=pi/2.0;} if(x1==x3&&y1<y3) {wrt=3.0*pi/2.0;}