mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Restore handling of -0 in the C field of lines in line_construct().
Commita7dc63d904
inadvertedly removed this bit originally introduced by43fe90f66a
, causing regression test failures on some platforms, due to producing {1,-1,-0} instead of {1,-1,0}.
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user