Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use proper variable as index for array access #104

Merged
merged 1 commit into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
- `setPoint1()` and `setPoint2()` methods from `Line`
- `setSeparator()`, `useCardinalLetters()` and `setUnits()` methods from `DMS`

## [4.2.0] - Current Version, 2022-07-25
## [4.2.1] - 2023-12-03

## Changed
### Changed

- use proper variable as index for array access

## [4.2.0] - 2022-07-25

### Changed

- point-to-line distance is calculated iteratively now, fixes #92
- improved intersection checking for polygon/polygon
Expand Down
2 changes: 1 addition & 1 deletion src/Polygon.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function getSegments(): array

// to close the polygon we have to add the final segment between
// the last point and the first point
$segments[] = new Line($this->points[$i - 1], $this->points[0]);
$segments[] = new Line($this->points[$length - 1], $this->points[0]);

return $segments;
}
Expand Down