Allow Line to take in 2d arrays as arguments

This commit is contained in:
Grant Sanderson 2020-12-08 09:27:20 -08:00
parent 9dc4551685
commit 2461248ef6

View file

@ -448,7 +448,11 @@ class Line(TipableVMobject):
return mob.get_center()
else:
return mob.get_boundary_point(direction)
return mob_or_point
else:
point = mob_or_point
result = np.zeros(self.dim)
result[:len(point)] = point
return result
def put_start_and_end_on(self, start, end):
curr_start, curr_end = self.get_start_and_end()