Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Add inflection parameter to rush_into and rush_from

Grant Sanderson3aadc1fb7810
diff --git a/manimlib/utils/rate_functions.py b/manimlib/utils/rate_functions.py
index fbbe7f5eb..39f9cd15c 100644
--- a/manimlib/utils/rate_functions.py
+++ b/manimlib/utils/rate_functions.py
@@ -16,12 +16,12 @@ def smooth(t, inflection=10.0):
)
-def rush_into(t):
- return 2 * smooth(t / 2.0)
+def rush_into(t, inflection=10.0):
+ return 2 * smooth(t / 2.0, inflection)
-def rush_from(t):
- return 2 * smooth(t / 2.0 + 0.5) - 1
+def rush_from(t, inflection=10.0):
+ return 2 * smooth(t / 2.0 + 0.5, inflection) - 1
def slow_into(t):