make Point2D mirror function duplicate point INCLUDING color value.
This commit is contained in:
parent
76d26b08c8
commit
8631e1353f
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ def mirror_points(points: list[Point2D]) -> list[Point2D]:
|
||||||
mirrored_points = []
|
mirrored_points = []
|
||||||
for point in points:
|
for point in points:
|
||||||
mirrored_x = 128 - point.x # Calculate the mirrored x-coordinate
|
mirrored_x = 128 - point.x # Calculate the mirrored x-coordinate
|
||||||
mirrored_point = Point2D(mirrored_x, point.y)
|
mirrored_point = Point2D(mirrored_x, point.y, point.color)
|
||||||
mirrored_points.append(mirrored_point)
|
mirrored_points.append(mirrored_point)
|
||||||
return mirrored_points
|
return mirrored_points
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue