Commit 37bb96a2 authored by Paul Ramsey's avatar Paul Ramsey

Quiet compiler warnings regarding abs/fabs


git-svn-id: http://svn.osgeo.org/postgis/trunk@16370 b70326c6-7e19-0410-871a-916f4a2858ee
parent 89b082b0
Pipeline #17015964 failed with stage
in 6 minutes and 34 seconds
......@@ -1144,10 +1144,10 @@ static void do_median_test(char* input, char* expected, int fail_if_not_converge
passed = passed && (lwgeom_has_z((LWGEOM*) expected_result) == lwgeom_has_z((LWGEOM*) result));
if (!lwgeom_is_empty((LWGEOM*) result))
{
passed = passed && abs(actual_pt.x - expected_pt.x) < tolerance;
passed = passed && abs(actual_pt.y - expected_pt.y) < tolerance;
passed = passed && (!lwgeom_has_z((LWGEOM*) expected_result) || abs(actual_pt.z - expected_pt.z) < tolerance);
passed = passed && (!lwgeom_has_m((LWGEOM*) expected_result) || abs(actual_pt.m - expected_pt.m) < tolerance);
passed = passed && fabs(actual_pt.x - expected_pt.x) < tolerance;
passed = passed && fabs(actual_pt.y - expected_pt.y) < tolerance;
passed = passed && (!lwgeom_has_z((LWGEOM*) expected_result) || fabs(actual_pt.z - expected_pt.z) < tolerance);
passed = passed && (!lwgeom_has_m((LWGEOM*) expected_result) || fabs(actual_pt.m - expected_pt.m) < tolerance);
}
if (!passed)
printf("median_test input %s (parsed %s) expected %s got %s\n", input, lwgeom_to_ewkt(g), lwgeom_to_ewkt((LWGEOM*) expected_result), lwgeom_to_ewkt((LWGEOM*) result));
......
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