So it turns out Pygame has undocumented modules. Well, actually, they're documented, but not on the website. Typing help(a_python_object) on the interactive interpreter shows an object's documentation, including its docstrings, and Pygame.math (and other undocumented modules) is no exception.
Pygame actually has a Vector2 class, which is a 2D vector. I'm going to look into whether or not it's actually faster than us using lists. Even if not, it'll at least provide for cleaner code.
So it turns out Pygame has undocumented modules. Well, actually, they're documented, but not on the website. Typing
help(a_python_object)
on the interactive interpreter shows an object's documentation, including its docstrings, and Pygame.math (and other undocumented modules) is no exception.Pygame actually has a Vector2 class, which is a 2D vector. I'm going to look into whether or not it's actually faster than us using lists. Even if not, it'll at least provide for cleaner code.