Skip to content

Commit

Permalink
Remove math import for infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekYang2 committed Jan 9, 2025
1 parent ca938be commit 42e2b44
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/bootcamp/decision_waypoint_landing_pads.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Travel to designated waypoint and then land at a nearby landing pad.
"""

import math
from .. import commands
from .. import drone_report

Expand Down Expand Up @@ -99,7 +98,7 @@ def run(
command = commands.Command.create_set_relative_destination_command(rel_x, rel_y)
else:
if self.closest_landing_location is None:
min_dist_sq = math.inf
min_dist_sq = float("inf")
for landing_pad_location in landing_pad_locations:
current_dist_sq = self.dist_sq(report.position, landing_pad_location)
if current_dist_sq < min_dist_sq:
Expand Down

0 comments on commit 42e2b44

Please sign in to comment.