mirror of
https://github.com/3b1b/manim.git
synced 2025-08-20 05:14:12 +00:00
Allow CoordinateSystem.coords_to_point to work on arrays of coords
This commit is contained in:
parent
c3e13fff05
commit
bd6c731e67
1 changed files with 4 additions and 4 deletions
|
@ -323,10 +323,10 @@ class Axes(VGroup, CoordinateSystem):
|
|||
|
||||
def coords_to_point(self, *coords):
|
||||
origin = self.x_axis.number_to_point(0)
|
||||
result = origin.copy()
|
||||
for axis, coord in zip(self.get_axes(), coords):
|
||||
result += (axis.number_to_point(coord) - origin)
|
||||
return result
|
||||
return origin + sum(
|
||||
axis.number_to_point(coord) - origin
|
||||
for axis, coord in zip(self.get_axes(), coords)
|
||||
)
|
||||
|
||||
def point_to_coords(self, point):
|
||||
return tuple([
|
||||
|
|
Loading…
Add table
Reference in a new issue