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
|
@@ 81-83 (lines=3) @@
|
78 |
|
return $segments; |
79 |
|
} |
80 |
|
|
81 |
|
for ($i = 1; $i < $length; $i++) { |
82 |
|
$segments[] = new Line($this->points[$i - 1], $this->points[$i]); |
83 |
|
} |
84 |
|
|
85 |
|
return $segments; |
86 |
|
} |