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 = []
|
||||
for point in points:
|
||||
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)
|
||||
return mirrored_points
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue