mirror of
https://github.com/3b1b/manim.git
synced 2025-07-30 13:34:19 +08:00
Used np.clip in Animation.update
This commit is contained in:
@ -48,10 +48,7 @@ class Animation(object):
|
||||
return deepcopy(self)
|
||||
|
||||
def update(self, alpha):
|
||||
if alpha < 0:
|
||||
alpha = 0.0
|
||||
if alpha > 1:
|
||||
alpha = 1.0
|
||||
alpha = np.clip(alpha, 0, 1)
|
||||
self.update_mobject(self.rate_func(alpha))
|
||||
|
||||
def update_mobject(self, alpha):
|
||||
|
Reference in New Issue
Block a user