You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The solar system simulator (part 6) crashes if two planets happen to have zero distance between them. Here's the error message Python generates:
$ python simulator.py
Traceback (most recent call last):
File "simulator.py", line 144, in <module>
calculateMovement()
File "simulator.py", line 66, in calculateMovement
nDirection = (direction[0] / magnitude, direction[1] / magnitude) # Normalis
ed Vector pointing in the direction of the force
ZeroDivisionError: float division by zero
The text was updated successfully, but these errors were encountered:
The solar system simulator (part 6) crashes if two planets happen to have zero distance between them. Here's the error message Python generates:
The text was updated successfully, but these errors were encountered: