I'll merge this in now. Consider it stable(ish).
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)
-
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
IDK about physics, but AIUI, Z points from side to side, Y points down and
X points diagonally; it's Λ that points up.
(sorry)
Russell
On 1 March 2018 at 08:43, Greg Ewing wrote:
> Daniel Pope wrote:
>
> Y points up in real physics?
>>
>
> No, no, no. Z points up
René Dudfield wrote:
So it might be nice to return the length(magnitude) there?
BTW, I don't really like the name "length" for a function
that returns the magnitude of an arbitrary vector. It only
makes sense for vectors representing a physical distance;
it's nonsense for anything else
Having normalize_ip return the old length would be a bit weird.
Yeah, another name like 'normalize_ip_return_length' But maybe longer ;)
speed = direction.length_normalize_ip()
What is UP for rock climbers hanging upside down,
when they are chatting on their phone,
which points towards the horizon,
whilst they live in Australia? ;)
( @Ian... give in to the temptation... )
Thanks Victor, those are some good notes.
And I guess some of them will take some time to
On Thu, Mar 1, 2018 at 1:43 AM, Greg Ewing
wrote:
> No, no, no. Z points up in real physics!
Oh, and I expect "j" is the imaginary unit, "Σ"s can be omitted, gravity is
exactly 10 m/s, without the square, and anyway one can drop units whenever
one feels like it?
(
Daniel Pope wrote:
Y points up in real physics?
No, no, no. Z points up in real physics!
--
Greg