From 8db115529b96d6713af51951b36bd3a78b0dfdb1 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 17 Nov 2017 20:14:44 +0100 Subject: [PATCH] Init var --- Math/Geometry/Shape/D2/Polygon.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Math/Geometry/Shape/D2/Polygon.php b/Math/Geometry/Shape/D2/Polygon.php index 0e4e98029..45ed1ca25 100644 --- a/Math/Geometry/Shape/D2/Polygon.php +++ b/Math/Geometry/Shape/D2/Polygon.php @@ -236,9 +236,7 @@ class Polygon implements D2ShapeInterface */ public function getBarycenter() : array { - $barycenter['x'] = 0; - $barycenter['y'] = 0; - + $barycenter = ['x' => 0, 'y' => 0]; $count = count($this->coord); for ($i = 0; $i < $count - 1; $i++) {