Commit 74294c73 authored by Tomas Vondra's avatar Tomas Vondra

Restore handling of -0 in the C field of lines in line_construct().

Commit a7dc63d9 inadvertedly removed this bit originally introduced
by 43fe90f6, causing regression test failures on some platforms,
due to producing {1,-1,-0} instead of {1,-1,0}.
parent fb17eabf
...@@ -1024,6 +1024,9 @@ line_construct(LINE *result, Point *pt, float8 m) ...@@ -1024,6 +1024,9 @@ line_construct(LINE *result, Point *pt, float8 m)
result->A = m; result->A = m;
result->B = -1.0; result->B = -1.0;
result->C = pt->y - m * pt->x; result->C = pt->y - m * pt->x;
/* on some platforms, the preceding expression tends to produce -0 */
if (result->C == 0.0)
result->C = 0.0;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment