static graph_t *getCluster(char *cluster_name, Dt_t *map) {
Agraph_t* sg;
- if (!cluster_name || (*cluster_name == '\0'))
+ if (!cluster_name || *cluster_name == '\0')
return NULL;
sg = findCluster (map, cluster_name);
if (sg == NULL) {
for (i = 1; i <= 3; i++) {
old_sign = sign;
sign = CMP(pts[i].x, xcoord);
- if ((sign != old_sign) && (old_sign != 0))
+ if (sign != old_sign && old_sign != 0)
num_crossings++;
}
return num_crossings;
for (i = 1; i <= 3; i++) {
old_sign = sign;
sign = CMP(pts[i].y, ycoord);
- if ((sign != old_sign) && (old_sign != 0))
+ if (sign != old_sign && old_sign != 0)
num_crossings++;
}
return num_crossings;
return -1.0;
/* if 1 crossing and on the line x == xcoord (within 0.005 point) */
- if ((no_cross == 1) && (fabs(pts[3].x - xcoord) <= 0.005)) {
- if ((ymin <= pts[3].y) && (pts[3].y <= ymax)) {
+ if (no_cross == 1 && fabs(pts[3].x - xcoord) <= 0.005) {
+ if (ymin <= pts[3].y && pts[3].y <= ymax) {
return tmax;
} else
return -1.0;
return -1.0;
/* if 1 crossing and on the line y == ycoord (within 0.005 point) */
- if ((no_cross == 1) && (fabs(pts[3].y - ycoord) <= 0.005)) {
- if ((xmin <= pts[3].x) && (pts[3].x <= xmax)) {
+ if (no_cross == 1 && fabs(pts[3].y - ycoord) <= 0.005) {
+ if (xmin <= pts[3].x && pts[3].x <= xmax) {
return tmax;
} else
return -1.0;
}
t = findVertical(pts, 0.0, 1.0, bb->LL.x, bb->LL.y, bb->UR.y);
- if ((t >= 0) && (t < tmin)) {
+ if (t >= 0 && t < tmin) {
Bezier(origpts, 3, t, pts, NULL);
tmin = t;
}
t = findVertical(pts, 0.0, MIN(1.0, tmin), bb->UR.x, bb->LL.y,
bb->UR.y);
- if ((t >= 0) && (t < tmin)) {
+ if (t >= 0 && t < tmin) {
Bezier(origpts, 3, t, pts, NULL);
tmin = t;
}
t = findHorizontal(pts, 0.0, MIN(1.0, tmin), bb->LL.y, bb->LL.x,
bb->UR.x);
- if ((t >= 0) && (t < tmin)) {
+ if (t >= 0 && t < tmin) {
Bezier(origpts, 3, t, pts, NULL);
tmin = t;
}
t = findHorizontal(pts, 0.0, MIN(1.0, tmin), bb->UR.y, bb->LL.x,
bb->UR.x);
- if ((t >= 0) && (t < tmin)) {
+ if (t >= 0 && t < tmin) {
Bezier(origpts, 3, t, pts, NULL);
tmin = t;
}
}
} else {
for (endi = 0; endi < size - 1; endi += 3) {
- if (splineIntersectf(&(bez->list[endi]), bb))
+ if (splineIntersectf(&bez->list[endi], bb))
break;
}
if (endi == size - 1) { /* no intersection */