diff --git a/lib/geometry/Point.class.php b/lib/geometry/Point.class.php index 8a1cb4e3..3e80adb6 100644 --- a/lib/geometry/Point.class.php +++ b/lib/geometry/Point.class.php @@ -34,6 +34,11 @@ public function __construct($x, $y) { throw new Exception("Bad coordinates: x and y should be numeric"); } + + // Convert to floatval in case they are passed in as a string or integer etc. + $x = floatval($x); + $y = floatval($y); + $this->position = array($x, $y); }