Index: eagle_bin.c =================================================================== --- eagle_bin.c (revision 31001) +++ eagle_bin.c (revision 31002) @@ -1470,7 +1470,7 @@ x3 = (x1+x2)/2; y3 = (y1+y2)/2; - if (PCB_ABS(x2-x1) < PCB_ABS(y2-y1)) { + if (RND_ABS(x2-x1) < RND_ABS(y2-y1)) { cx = c; cy = (long)((x3-cx)*(x2-x1)/(double)((y2-y1)) + y3); } else { @@ -1500,8 +1500,8 @@ } else { delta_x = (double)(x1 - cx); delta_y = (double)(y1 - cy); - theta_1 = PCB_RAD_TO_DEG*atan2(-delta_y, delta_x); - theta_2 = PCB_RAD_TO_DEG*atan2(-(y2 - cy), (x2 - cx)); + theta_1 = RND_RAD_TO_DEG*atan2(-delta_y, delta_x); + theta_2 = RND_RAD_TO_DEG*atan2(-(y2 - cy), (x2 - cx)); theta_1 = 180 - theta_1; /* eagle coord system */ theta_2 = 180 - theta_2; /* eagle coord system */ Index: read.c =================================================================== --- read.c (revision 31001) +++ read.c (revision 31002) @@ -675,7 +675,7 @@ sidelen = sqrt(sidex * sidex + sidey * sidey); nx = -sidey / sidelen; ny = sidex / sidelen; - r = (sidelen / 2) / tan(curvang / PCB_RAD_TO_DEG / 2.0); + r = (sidelen / 2) / tan(curvang / RND_RAD_TO_DEG / 2.0); cx = rnd_round(midx + nx * r); cy = rnd_round(midy + ny * r); /* rnd_trace("curve mid: %mm;%mm center: %mm;%mm\n", midx, midy, cx, cy);*/ @@ -683,8 +683,8 @@ dx = x1 - cx; dy = y1 - cy; r = sqrt(dx * dx + dy * dy); - sa = 180.0 - atan2(y1 - cy, x1 - cx) * PCB_RAD_TO_DEG; - ea = 180.0 - atan2(y2 - cy, x2 - cx) * PCB_RAD_TO_DEG; + sa = 180.0 - atan2(y1 - cy, x1 - cx) * RND_RAD_TO_DEG; + ea = 180.0 - atan2(y2 - cy, x2 - cx) * RND_RAD_TO_DEG; da = ea - sa; /* rnd_trace(" r=%mm %f %f -> %f\n", (rnd_coord_t)r, sa, ea, da);*/ arc = pcb_arc_new(ly, cx, cy, r, r, sa, da, th, st->md_wire_wire*2, pcb_flag_make(PCB_FLAG_CLEARLINE), 0); @@ -881,7 +881,7 @@ if (rot != 0) { int n; - double sina = sin(-(double)rot / PCB_RAD_TO_DEG), cosa = cos(-(double)rot / PCB_RAD_TO_DEG); + double sina = sin(-(double)rot / RND_RAD_TO_DEG), cosa = cos(-(double)rot / RND_RAD_TO_DEG); for(n = 0; n < sizeof(shapes)/sizeof(shapes[0]); n++) { if (shapes[n].layer_mask == 0) break; @@ -1194,7 +1194,7 @@ } else if (moduleRotation != 0) { double rot = moduleRotation; - pcb_subc_rotate(subc, moduleX, moduleY, cos(rot/PCB_RAD_TO_DEG), sin(rot/PCB_RAD_TO_DEG), rot); + pcb_subc_rotate(subc, moduleX, moduleY, cos(rot/RND_RAD_TO_DEG), sin(rot/RND_RAD_TO_DEG), rot); } #endif @@ -1465,8 +1465,8 @@ else { double sina, cosa; ang = -ang; - sina = sin(ang / PCB_RAD_TO_DEG); - cosa = cos(ang / PCB_RAD_TO_DEG); + sina = sin(ang / RND_RAD_TO_DEG); + cosa = cos(ang / RND_RAD_TO_DEG); pcb_subc_rotate(new_subc, x, y, cosa, sina, ang); } }