src/Polygon.php 1 location
|
@@ 104-106 (lines=3) @@
|
101 |
|
return $segments; |
102 |
|
} |
103 |
|
|
104 |
|
for ($i = 1; $i < $length; $i++) { |
105 |
|
$segments[] = new Line($this->points[$i - 1], $this->points[$i]); |
106 |
|
} |
107 |
|
|
108 |
|
// to close the polygon we have to add the final segment between |
109 |
|
// the last point and the first point |
src/Polyline.php 1 location
|
@@ 69-71 (lines=3) @@
|
66 |
|
return $segments; |
67 |
|
} |
68 |
|
|
69 |
|
for ($i = 1; $i < $length; $i++) { |
70 |
|
$segments[] = new Line($this->points[$i - 1], $this->points[$i]); |
71 |
|
} |
72 |
|
|
73 |
|
return $segments; |
74 |
|
} |