Skip to content

Commit

Permalink
Remove std::midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
gmajrobotec committed Feb 3, 2025
1 parent 2bfa5fd commit 2661901
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simulation/traffic_simulator/src/utils/distance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ auto distanceToSpline(
auto s_end_distance = spline.getSquaredDistanceIn2D(point, s_end);

while (std::abs(s_start - s_end) > distance_accuracy) {
double s_mid = std::midpoint(s_start, s_end);
double s_mid = s_start + (s_end - s_start) / 2;
double s_mid_distance = spline.getSquaredDistanceIn2D(point, s_mid);
if (s_start_distance > s_end_distance) {
s_start = s_mid;
Expand Down

0 comments on commit 2661901

Please sign in to comment.