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
|
@@ 71-73 (lines=3) @@
|
68 |
|
return $segments; |
69 |
|
} |
70 |
|
|
71 |
|
for ($i = 1; $i < $length; $i++) { |
72 |
|
$segments[] = new Line($this->points[$i - 1], $this->points[$i]); |
73 |
|
} |
74 |
|
|
75 |
|
return $segments; |
76 |
|
} |