From e8ddbd30ebad99d50e9bf43e1a3efe118060faac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 27 Sep 2016 09:28:35 +0200 Subject: [PATCH] Do not use Util::pow with sqrt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using bigger precision and passing it to standard precision makes no sense. Signed-off-by: Michal Čihař --- libraries/gis/GISPolygon.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libraries/gis/GISPolygon.php b/libraries/gis/GISPolygon.php index bc03d2ab5b..cfccae8da9 100644 --- a/libraries/gis/GISPolygon.php +++ b/libraries/gis/GISPolygon.php @@ -538,10 +538,7 @@ class GISPolygon extends GISGeometry // Always keep $epsilon < 1 to go with the reduction logic down here $epsilon = 0.1; - $denominator = sqrt( - Util::pow(($y1 - $y0), 2) - + Util::pow(($x0 - $x1), 2) - ); + $denominator = sqrt(pow(($y1 - $y0), 2) + pow(($x0 - $x1), 2)); $pointA = array(); $pointB = array();