Skip to content

Commit

Permalink
Update move.py
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbailey authored Dec 15, 2023
1 parent 1c492dd commit bea7f4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dpd/mechanics/move.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def move(acceleration, initial_velocity, time, max_speed=None):
final_velocity = initial_velocity + acceleration * time
if max_speed and final_velocity > max_speed:
if max_speed is not None and final_velocity > max_speed:
final_velocity = max_speed
time_accelerating = (final_velocity - initial_velocity) / acceleration
time_constant_speed = time - time_accelerating
Expand Down

0 comments on commit bea7f4f

Please sign in to comment.