Skip to content

Commit

Permalink
Merge pull request #92 from tmgreensolutions/patch-1
Browse files Browse the repository at this point in the history
Update Point.php to update dimension when using setAltitude
  • Loading branch information
saibotk authored Jul 4, 2024
2 parents 8cbe80a + efa9ea0 commit 750645e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Improved
- Updated `spatie/invade` to v2, works without reflection now 🥳

### Fixed
- Fixed not updating `Point` dimension when using `setAltitude`

## [1.5.0](https://github.com/clickbar/laravel-magellan/tree/1.5.0) - 2024-01-19

### Added
Expand Down
6 changes: 3 additions & 3 deletions src/Data/Geometries/Point.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function getLatitude(): float
public function setLatitude(float $latitude): void
{
$this->assertPointIsGeodetic();
$this->y = $latitude;
$this->setY($latitude);
}

public function getLongitude(): float
Expand All @@ -140,7 +140,7 @@ public function getLongitude(): float
public function setLongitude(float $longitude): void
{
$this->assertPointIsGeodetic();
$this->x = $longitude;
$this->setX($longitude);
}

public function getAltitude(): ?float
Expand All @@ -153,7 +153,7 @@ public function getAltitude(): ?float
public function setAltitude(float $altitude): void
{
$this->assertPointIsGeodetic();
$this->z = $altitude;
$this->setZ($altitude);
}

private function assertPointIsGeodetic()
Expand Down

0 comments on commit 750645e

Please sign in to comment.