]> granicus.if.org Git - postgis/commitdiff
Reduce the precision of the double test... it passes here.. (#2043)
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 12 Oct 2012 19:32:26 +0000 (19:32 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 12 Oct 2012 19:32:26 +0000 (19:32 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10423 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/cunit/cu_geodetic.c

index 393704b278ce5018af8d702359118a48f84b35aa..6b3b57e711d65d8b51d2565a28431df4587effa0 100644 (file)
@@ -989,9 +989,9 @@ static void test_spheroid_area(void)
        lwgeom_calculate_gbox_geodetic(lwg, &gbox);
        a1 = lwgeom_area_sphere(lwg, &s);
        a2 = lwgeom_area_spheroid(lwg, &s);
-       //printf("\nsphere: %.12g\nspheroid: %.12g\n", a1, a2);
-       CU_ASSERT_DOUBLE_EQUAL(a1, 89.7127703297, 0.0001); /* sphere */
-       CU_ASSERT_DOUBLE_EQUAL(a2, 89.8684316032, 0.0001); /* spheroid */
+       printf("\nsphere: %.12g\nspheroid: %.12g\n", a1, a2);
+       CU_ASSERT_DOUBLE_EQUAL(a1, 89.7127703297, 0.001); /* sphere */
+       CU_ASSERT_DOUBLE_EQUAL(a2, 89.8684316032, 0.001); /* spheroid */
        lwgeom_free(lwg);
 
        /* Big-ass polygon */
@@ -1009,7 +1009,7 @@ static void test_spheroid_area(void)
        lwgeom_calculate_gbox_geodetic(lwg, &gbox);
        a1 = lwgeom_area_sphere(lwg, &s);
        a2 = lwgeom_area_spheroid(lwg, &s);
-       printf("\nsphere: %.12g\nspheroid: %.12g\n", a1, a2);
+       //printf("\nsphere: %.12g\nspheroid: %.12g\n", a1, a2);
        CU_ASSERT_DOUBLE_EQUAL(a1, 12360265021.1, 10.0); /* sphere */
        CU_ASSERT_DOUBLE_EQUAL(a2, 12304814950.073, 100.0); /* spheroid */
        lwgeom_free(lwg);