wd = data->wd;
ht = data->ht;
fprintf(fp, "%f %f %f %f doBox\n", wd, ht,
- data->pos.x - (wd / 2), data->pos.y - (ht / 2));
+ data->pos.x - wd / 2, data->pos.y - ht / 2);
}
#else
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
double r;
wd = ND_width(n);
ht = ND_height(n);
- r = sqrt((wd * wd / 4) + ht * ht / 4);
+ r = sqrt(wd * wd / 4 + ht * ht / 4);
fprintf(fp, "%f inch %f inch %f inch %f inch doBox\n", wd, ht,
- ND_pos(n)[0] - (wd / 2), ND_pos(n)[1] - (ht / 2));
+ ND_pos(n)[0] - wd / 2, ND_pos(n)[1] - ht / 2);
fprintf(fp, "%f inch %f inch %f inch drawCircle\n",
ND_pos(n)[0], ND_pos(n)[1], r);
} else {
short cnt = ED_count(de);
edge_t **el;
- el = (edge_t **) (ED_to_virt(de));
+ el = (edge_t**)ED_to_virt(de);
el = gv_recalloc(el, cnt, cnt + 1, sizeof(edge_t*));
el[cnt] = e;
ED_to_virt(de) = (edge_t *) el;
xdelta = ND_pos(q)[0] - ND_pos(p)[0];
ydelta = ND_pos(q)[1] - ND_pos(p)[1];
dist = hypot(xdelta, ydelta);
- force = (dout * dout) / (X_K * dist);
+ force = dout * dout / (X_K * dist);
#elif defined(ALT)
xdelta = ND_pos(q)[0] - ND_pos(p)[0];
ydelta = ND_pos(q)[1] - ND_pos(p)[1];