pygame-geometry icon indicating copy to clipboard operation
pygame-geometry copied to clipboard

Add Line `flip()`

Open itzpr3d4t0r opened this issue 2 years ago • 0 comments

I propose adding the following new methods to the Line class:

  • flip_x() -> flips the line along the x-axis
  • flip_y() -> flips the line along the y-axis
  • _ip versions

This proposal should follow issue #182, where we rename the following methods:

  • Line.flip() -> flip_endpoints()
  • Line.flip_ip() -> flip_endpoints_ip()

This should be done to avoid confusion with line flipping along the x and y axis.

Alternatively, we could consider adding a general flip()/flip_ip() method that takes an axis as an argument. This would allow users to flip the line along any arbitrary axis.

itzpr3d4t0r avatar Jan 12 '23 16:01 itzpr3d4t0r