4 double real_dx(DGT *dgt,int dx)
5 { return (dgt->XRight-dgt->XLeft)*dx/65535;
8 double real_dy(DGT *dgt,int dy)
9 { return (dgt->YTop-dgt->YBottom)*dy/65535;
11 double dgt_dist(DGT *dgt,int x1,int y1,int x2,int y2)
13 return hypot(real_dx(dgt,x1-x2),real_dy(dgt,y1-y2));
15 double dgt_pdist(DGT *dgt,POINT p1,POINT p2)
17 return hypot(real_dx(dgt,p1.x-p2.x),real_dy(dgt,p1.y-p2.y));
19 double dgt_atan2(DGT *dgt,int dx,int dy)
20 { return atan2(dy/(dgt->XRight-dgt->XLeft),dx/(dgt->YTop-dgt->YBottom));