]> granicus.if.org Git - graphviz/commitdiff
Fix bug 786
authorellson <devnull@localhost>
Tue, 18 Oct 2005 21:10:17 +0000 (21:10 +0000)
committerellson <devnull@localhost>
Tue, 18 Oct 2005 21:10:17 +0000 (21:10 +0000)
lib/common/shapes.c

index dbda841d022f04699a7e7fefa5b329e86c42125f..d05c7a2c8fccb2ce8dd6838b0c0a6008559f29f2 100644 (file)
@@ -1147,7 +1147,7 @@ compassPort(node_t* n, box* bp, port* pp, char* compass, int sides, inside_t* ic
        /* compute angle with 0 at north pole, increasing CCW */
        double angle = atan2(p.y,p.x) + 1.5*PI;
        if (angle >= 2*PI) angle -= 2*PI;
-       pp->order = (int)((MC_SCALE * angle) / 2*PI);
+       pp->order = (int)((MC_SCALE * angle) / (2*PI));
     }
     pp->constrained = constrain;
     pp->defined = defined;
@@ -1760,6 +1760,8 @@ static port record_port(node_t * n, char *portname, char *compass)
     } else if (compassPort(n, &f->b, &rv, portname, sides, NULL)) {
        unrecognized(n, portname);
     }
+fprintf (stderr, "port %s:%s:%s %d\n", n->name, (portname?portname:""),
+(compass?compass:""), rv.order);
 
     return rv;
 }