mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Replace np.clip with clip
This commit is contained in:
parent
065979e2e1
commit
b504899714
1 changed files with 3 additions and 2 deletions
|
@ -9,6 +9,7 @@ from manimlib.utils.config_ops import digest_config
|
|||
from manimlib.utils.iterables import adjacent_n_tuples
|
||||
from manimlib.utils.iterables import adjacent_pairs
|
||||
from manimlib.utils.simple_functions import fdiv
|
||||
from manimlib.utils.simple_functions import clip
|
||||
from manimlib.utils.space_ops import angle_of_vector
|
||||
from manimlib.utils.space_ops import angle_between_vectors
|
||||
from manimlib.utils.space_ops import compass_directions
|
||||
|
@ -548,8 +549,8 @@ class TangentLine(Line):
|
|||
def __init__(self, vmob, alpha, **kwargs):
|
||||
digest_config(self, kwargs)
|
||||
da = self.d_alpha
|
||||
a1 = np.clip(alpha - da, 0, 1)
|
||||
a2 = np.clip(alpha + da, 0, 1)
|
||||
a1 = clip(alpha - da, 0, 1)
|
||||
a2 = clip(alpha + da, 0, 1)
|
||||
super().__init__(
|
||||
vmob.point_from_proportion(a1),
|
||||
vmob.point_from_proportion(a2),
|
||||
|
|
Loading…
Add table
Reference in a new issue