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 Jan 29, 2024
1 parent 48c852b commit 0e8a9ee
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 @@ -236,9 +236,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 0e8a9ee

Please sign in to comment.