mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 08:54:38 +08:00
Allow CoordinateSystem.coords_to_point to work on arrays of coords
This commit is contained in:
@ -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([
|
||||
|
Reference in New Issue
Block a user