mirror of
https://github.com/3b1b/manim.git
synced 2025-08-31 23:58:32 +00:00
Fixed CurvedArrow constructor by moving get_length() to base class.
I moved get_length() from the Line class to the shared base class, TipableVMobject. TESTED python3 -m manim manim_tutorial_P37.py MoreShapes -pl
This commit is contained in:
parent
61dbad5edd
commit
73a6c2400b
1 changed files with 4 additions and 4 deletions
|
@ -138,6 +138,10 @@ class TipableVMobject(VMobject):
|
|||
else:
|
||||
return VMobject.get_start(self)
|
||||
|
||||
def get_length(self):
|
||||
start, end = self.get_start_and_end()
|
||||
return get_norm(start - end)
|
||||
|
||||
def has_tip(self):
|
||||
return hasattr(self, "tip") and self.tip in self
|
||||
|
||||
|
@ -439,10 +443,6 @@ class Line(TipableVMobject):
|
|||
return mob.get_boundary_point(direction)
|
||||
return np.array(mob_or_point)
|
||||
|
||||
def get_length(self):
|
||||
start, end = self.get_start_and_end()
|
||||
return get_norm(start - end)
|
||||
|
||||
def get_vector(self):
|
||||
return self.get_end() - self.get_start()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue