Skip to content

Commit

Permalink
fixed redundant if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
sanatd33 authored and sid-parikh committed Jan 31, 2024
1 parent e8c8003 commit f3e6aeb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions soccer/src/soccer/strategy/agent/position/offense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,7 @@ double Offense::distance_from_their_robots(rj_geometry::Point tail, rj_geometry:
return -1.0;
}
double angle = distance / projection;
if (min_angle < 0) {
min_angle = angle;
} else if (angle < min_angle) {
if ((min_angle < 0) || (angle < min_angle)) {
min_angle = angle;
}
}
Expand Down

0 comments on commit f3e6aeb

Please sign in to comment.