diff --git a/manimlib/utils/rate_functions.py b/manimlib/utils/rate_functions.py index a5646f30..fbbe7f5e 100644 --- a/manimlib/utils/rate_functions.py +++ b/manimlib/utils/rate_functions.py @@ -10,7 +10,10 @@ def linear(t): def smooth(t, inflection=10.0): error = sigmoid(-inflection / 2) - return (sigmoid(inflection * (t - 0.5)) - error) / (1 - 2 * error) + return np.clip( + (sigmoid(inflection * (t - 0.5)) - error) / (1 - 2 * error), + 0, 1, + ) def rush_into(t):