Hi, here is a PR for Vector changes from our discussion here (and elsewhere). https://github.com/pygame/pygame/pull/416
- Tests and fixes for keyword arguments with Vector2 Vector3 - Tests for Vector2, and Vector3 scalar constructors like GLSL. Vector3(1) -> Vector3(1, 1, 1) - missing an element is an error now, no zero default. Vector3(1, 2), and Vector3(x=1, y=2) fails. - Added magnitude to Vector types, which is an alias for length. - pygame.math require import (no missing module). - pygame.Vector2 pygame.Vector3 available. - Not in pygame.locals for now, to avoid possible breakage with common Vector2/Vector3 names. The one breakage is for when people were doing: - Vector2(1), which used to give Vector2(1, 0), and now gives Vector2(1, 1). - Vector3(1), which used to give Vector3(1, 0, 0), or Vector3(1,2) which used to give Vector3(1,2,0). This should be the last of the changes to the Vector stuff for now to be released in 1.9.4. Other things can be added later without breaking backwards compatibility. ciao, On Sun, Mar 4, 2018 at 1:32 AM, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote: > Russell Jones wrote: > >> IDK about physics, but AIUI, Z points from side to side, Y points down >> and X points diagonally; it's Λ that points up. >> > > Only if your computer screen is oriented vertically. > If you're using a tablet in your lap, Λ points forward > and Y points backwards. > > So obviously the code should interrogate the orientation > sensor of the device it's running on, if it has one, to > figure out the correct naming of the unit vector constants. > > -- > Greg > >