Skip to content

Commit

Permalink
Fix a typo in distance_along (#353)
Browse files Browse the repository at this point in the history
Fixing the initial value of traversed in distance_along. It should be 0f64 instead of 06f64.
  • Loading branch information
almontasser authored Nov 9, 2024
1 parent fbbc52e commit 7f62022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/ferrostar/src/algorithms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ fn distance_along(point: &Point, linestring: &LineString) -> Option<f64> {
}

let (_, _, traversed) = linestring.lines().try_fold(
(0f64, f64::INFINITY, 06f64),
(0f64, f64::INFINITY, 0f64),
|(cum_length, closest_dist_to_point, traversed), segment| {
// Convert to a LineString so we get haversine ops
let segment_linestring = LineString::from(segment);
Expand Down

0 comments on commit 7f62022

Please sign in to comment.