src/Polygon.php 1 location
|
@@ 117-119 (lines=3) @@
|
114 |
|
return $segments; |
115 |
|
} |
116 |
|
|
117 |
|
for ($i = 1; $i < $length; $i++) { |
118 |
|
$segments[] = new Line($this->points[$i - 1], $this->points[$i]); |
119 |
|
} |
120 |
|
|
121 |
|
// to close the polygon we have to add the final segment between |
122 |
|
// the last point and the first point |
src/Polyline.php 1 location
|
@@ 119-121 (lines=3) @@
|
116 |
|
return $segments; |
117 |
|
} |
118 |
|
|
119 |
|
for ($i = 1; $i < $length; $i++) { |
120 |
|
$segments[] = new Line($this->points[$i - 1], $this->points[$i]); |
121 |
|
} |
122 |
|
|
123 |
|
return $segments; |
124 |
|
} |