diff --git a/src/Geometries/PointCollection.php b/src/Geometries/PointCollection.php index b0aed6f..3381aa9 100644 --- a/src/Geometries/PointCollection.php +++ b/src/Geometries/PointCollection.php @@ -65,7 +65,7 @@ public function insertPoint($index, Point $point) throw new InvalidArgumentException('$index is greater than the size of the array'); } - array_splice($this->points, $offset, 0, [$point]); + array_splice($this->points, $index, 0, [$point]); } public function offsetExists($offset)