#include "config.h"
#include "render.h"
+#include <math.h>
#include "pathplan.h"
#include <setjmp.h>
#include <stdlib.h>
/* remove degenerate boxes. */
i = 0;
for (bi = 0; bi < boxn; bi++) {
- if (ABS(boxes[bi].LL.y - boxes[bi].UR.y) < .01)
+ if (fabs(boxes[bi].LL.y - boxes[bi].UR.y) < .01)
continue;
- if (ABS(boxes[bi].LL.x - boxes[bi].UR.x) < .01)
+ if (fabs(boxes[bi].LL.x - boxes[bi].UR.x) < .01)
continue;
if (i != bi)
boxes[i] = boxes[bi];
* an edge, starting from a list of control points.
*/
+#include <math.h>
#include "render.h"
#ifdef DEBUG
found = TRUE;
*odir = t;
}
- } while (ABS(opt.x - pt.x) > .5 || ABS(opt.y - pt.y) > .5);
+ } while (fabs(opt.x - pt.x) > .5 || fabs(opt.y - pt.y) > .5);
if (found)
for (i = 0; i < 4; i++)
sp[i] = best[i];
#include "htmltable.h"
#include "entities.h"
#include "logic.h"
+#include <math.h>
#include "gvc.h"
#include "strcasecmp.h"
t = (low + high) / 2.0;
p = Bezier(c, 3, t, NULL, NULL);
d = p.y - y;
- if (ABS(d) <= 1)
+ if (fabs(d) <= 1)
break;
if (d < 0)
high = t;
* merge edges with specified samehead/sametail onto the same port
*/
+#include <math.h>
#include "dot.h"
FIXME: I guess this adds an extra box for all edges in the rank */
if (u == l->list[0]->head) {
if (GD_rank(u->graph)[ND_rank(u)].ht2 <
- (ht = ABS(arr_prt.p.y)))
+ (ht = fabs(arr_prt.p.y)))
GD_rank(u->graph)[ND_rank(u)].ht2 = ht;
} else {
if (GD_rank(u->graph)[ND_rank(u)].ht1 <
- (ht = ABS(arr_prt.p.y)))
+ (ht = fabs(arr_prt.p.y)))
GD_rank(u->graph)[ND_rank(u)].ht1 = ht;
}
}
*/
{
double diff = old_stress - new_stress;
- double change = ABS(diff);
+ double change = fabs(diff);
converged = (((change / old_stress) < Epsilon)
|| (new_stress < Epsilon));
}
det01 = c[0][0] * c[1][1] - c[1][0] * c[0][1];
det0X = c[0][0] * x[1] - c[0][1] * x[0];
detX1 = x[0] * c[1][1] - x[1] * c[0][1];
- if (ABS(det01) >= 1e-6) {
+ if (fabs(det01) >= 1e-6) {
scale0 = detX1 / det01;
scale3 = det0X / det01;
}
- if (ABS(det01) < 1e-6 || scale0 <= 0.0 || scale3 <= 0.0) {
+ if (fabs(det01) < 1e-6 || scale0 <= 0.0 || scale3 <= 0.0) {
d01 = dist(inps[0], inps[inpn - 1]) / 3.0;
scale0 = d01;
scale3 = d01;