[postgis-tickets] r16323 - interpolate_point4d: PARANOIA check should be on raw value instead of absolute

Darafei komzpa at gmail.com
Tue Jan 16 09:24:00 PST 2018


Author: komzpa
Date: 2018-01-16 09:24:00 -0800 (Tue, 16 Jan 2018)
New Revision: 16323

Modified:
   trunk/liblwgeom/lwgeom_api.c
Log:
interpolate_point4d: PARANOIA check should be on raw value instead of absolute


Modified: trunk/liblwgeom/lwgeom_api.c
===================================================================
--- trunk/liblwgeom/lwgeom_api.c	2018-01-16 17:03:43 UTC (rev 16322)
+++ trunk/liblwgeom/lwgeom_api.c	2018-01-16 17:24:00 UTC (rev 16323)
@@ -704,11 +704,7 @@
 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);



More information about the postgis-tickets mailing list