mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
refactor: Move constants outside of variable scope (#7262)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -19,6 +19,12 @@ import random
|
||||
from matplotlib import animation
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
# Frame rate of the animation
|
||||
INTERVAL = 20
|
||||
|
||||
# Time between time steps in seconds
|
||||
DELTA_TIME = INTERVAL / 1000
|
||||
|
||||
|
||||
class Body:
|
||||
def __init__(
|
||||
@ -219,12 +225,6 @@ def plot(
|
||||
Utility function to plot how the given body-system evolves over time.
|
||||
No doctest provided since this function does not have a return value.
|
||||
"""
|
||||
# Frame rate of the animation
|
||||
INTERVAL = 20 # noqa: N806
|
||||
|
||||
# Time between time steps in seconds
|
||||
DELTA_TIME = INTERVAL / 1000 # noqa: N806
|
||||
|
||||
fig = plt.figure()
|
||||
fig.canvas.set_window_title(title)
|
||||
ax = plt.axes(
|
||||
|
Reference in New Issue
Block a user