Two graphs in the shapes regression test reference files (invhouse and
invtrapezium) contained a -0 coordinate. The Linux build produced the same
results, but the Windows build didn't, causing the regression tests to
fail.
To prevent values like -0 in the xdot output, a comparison is added just
before formatting the number.
*/
static void xdot_fmt_num (char* buf, double v)
{
+ // Prevents values like -0
+ if (v > -0.00000001 && v < 0.00000001)
+ {
+ v = 0;
+ }
sprintf(buf, "%.02f", v);
xdot_trim_zeros (buf, 1);
}
xdotversion=1.7
];
node [label="\N"];
- a [_draw_="c 7 -#000000 p 5 0 12.44 27 -0 54 12.44 53.97 32.56 0.03 32.56 ",
+ a [_draw_="c 7 -#000000 p 5 0 12.44 27 0 54 12.44 53.97 32.56 0.03 32.56 ",
height=0.5,
label="",
pos="27,18",
xdotversion=1.7
];
node [label="\N"];
- a [_draw_="c 7 -#000000 p 4 11.23 0 42.77 0 54 36 -0 36 ",
+ a [_draw_="c 7 -#000000 p 4 11.23 0 42.77 0 54 36 0 36 ",
height=0.5,
label="",
pos="27,18",