-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added rotation using degrees; Redefined and extended vector constants; Minor clean-up #102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nice additions here! I did leave a bunch of comments though, please take a look at them.
Please revert the formatting changes, though. I'm generally not a fan of most automatic formatters, especially super-strict ones like black, because I find that custom formatting here and there (mainly spacing) can make code much more readable. I see many examples of that here, most notably neighbors2D and neighbors3D. Furthermore, if I'm going to standardize the code formatting, I'd rather do it all at once - doing it in a PR like this makes it harder for me to see what the actual changes are.
Looks like I forgot to submit one of my comments: I quite like the DIAGONALS_2D/3D aliases, please move them up to the 2D/3D categories. |
I can't think of a use-case where a tuple would be beneficial to use over a set here. The only difference I could see is that a set is mutable, but that's still reverse-compatible |
Should I revert all non-functional changes, including isort, newlines, spacing between operators, commas at the end of listings and type annotations? |
(Discussion continued on Discord) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got a few more comments, mostly formatting nitpicks but a few functional comments as well.
I've ignored most formatting changes, but I did comment on the ones that I found actively detrimental. I'll look into putting up an autoformatter soon! Maybe I need to let go of custom formatting for the sake of consistency... but I'm not quite ready yet. I do want any color I like sometimes.
I took the liberty of adding functions for rotating vectors using degrees (a little more intuitive in my opinion), and redefined a bunch of vectors allowing for greater flexibility and clarity while remaining backward-compatible.
Formatted with black, and ran a linter or two over it plus some tiny refactoring tweaks here and there.
Feel free to change anything at all, I'm up to discuss anything!