diff options
Diffstat (limited to 'generic/Geo.c')
-rw-r--r-- | generic/Geo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/Geo.c b/generic/Geo.c index 069f53c..2ae242b 100644 --- a/generic/Geo.c +++ b/generic/Geo.c @@ -498,10 +498,11 @@ ShiftLine(ZnPoint *p1, else { dy_neg = False; } - if ((ABS(dy) < PRECISION_LIMIT) && (ABS(dx) < PRECISION_LIMIT)) { + if ((dy < PRECISION_LIMIT) && (dx < PRECISION_LIMIT)) { printf("ShiftLine: segment is a point\n"); return; } + if (dy <= dx) { dy = ((dist * shift_table[(dy*128)/dx]) + 64) / 128; if (!dx_neg) { |