Skip to content

Commit

Permalink
use proper variable as index for array access
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaschen committed Dec 3, 2023
1 parent 7e7fa6a commit dab4044
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
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

0 comments on commit dab4044

Please sign in to comment.