mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Replace np.clip with clip
This commit is contained in:
parent
34a1896ea8
commit
54067db386
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ import numpy as np
|
|||
|
||||
from manimlib.utils.bezier import bezier
|
||||
from manimlib.utils.simple_functions import sigmoid
|
||||
from manimlib.utils.simple_functions import clip
|
||||
|
||||
|
||||
def linear(t):
|
||||
|
@ -10,7 +11,7 @@ def linear(t):
|
|||
|
||||
def smooth(t, inflection=10.0):
|
||||
error = sigmoid(-inflection / 2)
|
||||
return np.clip(
|
||||
return clip(
|
||||
(sigmoid(inflection * (t - 0.5)) - error) / (1 - 2 * error),
|
||||
0, 1,
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue