Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Style fix to exponential_decay

Grant Sanderson3ebad5a4252f
diff --git a/utils/rate_functions.py b/utils/rate_functions.py
index e8d2bf3a8..5610319d7 100644
--- a/utils/rate_functions.py
+++ b/utils/rate_functions.py
@@ -84,23 +84,8 @@ def squish_rate_func(func, a=0.4, b=0.6):
def lingering(t):
return squish_rate_func(lambda t: t, 0, 0.8)(t)
-def exponential_decay(t, half_life = 0.1):
-# The half-life should be rather small to minimize the cut-off error at the end
- return 1 - np.exp(-t/half_life)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+def exponential_decay(t, half_life=0.1):
+ # The half-life should be rather small to minimize
+ # the cut-off error at the end
+ return 1 - np.exp(-t / half_life)