src/Polygon.php 1 location
|
@@ 106-108 (lines=3) @@
|
103 |
|
return $segments; |
104 |
|
} |
105 |
|
|
106 |
|
for ($i = 1; $i < $length; $i++) { |
107 |
|
$segments[] = new Line($this->points[$i - 1], $this->points[$i]); |
108 |
|
} |
109 |
|
|
110 |
|
// to close the polygon we have to add the final segment between |
111 |
|
// the last point and the first point |
src/Polyline.php 1 location
|
@@ 88-90 (lines=3) @@
|
85 |
|
return $segments; |
86 |
|
} |
87 |
|
|
88 |
|
for ($i = 1; $i < $length; $i++) { |
89 |
|
$segments[] = new Line($this->points[$i - 1], $this->points[$i]); |
90 |
|
} |
91 |
|
|
92 |
|
return $segments; |
93 |
|
} |