Skip to content

Commit

Permalink
Merge pull request #42 from pfeiferj/fix-bearing-node
Browse files Browse the repository at this point in the history
fix the check used to determine the node for calculating the bearing
  • Loading branch information
pfeiferj authored Jan 12, 2024
2 parents b6f91dd + 9cde279 commit 74813e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion way.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func NextWay(way Way, offline Offline, isForward bool) (NextWayResult, error) {
}

var bearingNode Coordinates
if matchNode == nodes.At(0) {
if matchNode.Latitude() == nodes.At(0).Latitude() && matchNode.Longitude() == nodes.At(0).Longitude() {
bearingNode = nodes.At(1)
} else {
bearingNode = nodes.At(nodes.Len() - 2)
Expand Down

0 comments on commit 74813e0

Please sign in to comment.