pygame-community / pygame-ce

🐍🎮 pygame - Community Edition is a FOSS Python library for multimedia applications (like games). Built on top of the excellent SDL library.
https://pyga.me
941 stars 156 forks source link

Added `geometry.Line` base #3131

Closed itzpr3d4t0r closed 1 month ago

itzpr3d4t0r commented 1 month ago

This pull request adds the Line class to the pygame.geometry module.

It also adds the ax, ay, bx, by, a, b attributes, str functionality (for printing), and the copy method. It also adds their associated docs and tests.

Credits

Geometry Project: For code, docs and tests: @novialriptide @Emc2356 @itzpr3d4t0r @ScriptLineStudios @avaxar @Matiiss @newpaxonian @maqa41 @blankRiot96 Also thanks to @Starbuck5 for kickstarting the idea and the occasional help!

Functionality added in this PR

damusss commented 1 month ago

woah

aatle commented 1 month ago

Is there any specific reason why the coordinates are named with xa, yb instead of ax, by? The current is annoying for me to parse mentally, as it looks backwards and the 'subscript' appears in front of the point.