]> granicus.if.org Git - postgis/commitdiff
interpolate_point4d: PARANOIA check should be on raw value instead of absolute
authorDarafei Praliaskouski <me@komzpa.net>
Tue, 16 Jan 2018 17:24:00 +0000 (17:24 +0000)
committerDarafei Praliaskouski <me@komzpa.net>
Tue, 16 Jan 2018 17:24:00 +0000 (17:24 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@16323 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwgeom_api.c

index 81366b15b1e3310758c3a82345698aff254a3354..1e386e1cc5134a93cb52ce00af42225e37246843 100644 (file)
@@ -704,11 +704,7 @@ void
 interpolate_point4d(const POINT4D *A, const POINT4D *B, POINT4D *I, double F)
 {
 #if PARANOIA_LEVEL > 0
-       double absF=fabs(F);
-       if ( absF < 0 || absF > 1 )
-       {
-               lwerror("interpolate_point4d: invalid F (%g)", F);
-       }
+       if (F < 0 || F > 1) lwerror("interpolate_point4d: invalid F (%g)", F);
 #endif
        I->x=A->x+((B->x-A->x)*F);
        I->y=A->y+((B->y-A->y)*F);