The 0 path in this function is, as the comment says, to avoid printing confusing
numbers like -0.00. However, the remainder of the function prints the number to
2 decimal places. So actually any number that *rounds* to -0.00 is going to come
out this way. To avoid this, we can expand the cases where we take an early
exit. This is also a minor performance speed up in these cases, as the 0 path is
faster than the common path.
void gvprintdouble(GVJ_t * job, double num)
{
// Prevents values like -0
- if (num > -0.00000001 && num < 0.00000001)
+ if (num > -0.005 && num < 0.005)
{
gvwrite(job, "0", 1);
return;