[pygame] Re: removing 'experimental' notice from pygame.math

2018-03-03 Thread René Dudfield
Indeed. Perhaps 'magnitude'? Then we could leave 'length' as an alias.

Not deprecate it, because it would be nice to keep true to the goal of the
API being similar to the GLSL vectors, which have the length() function.

Length is also confusing because... length of the container.



On Saturday, March 3, 2018, Greg Ewing  wrote:

> 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 (velocity, acceleration,
> electric field, etc.)
>
> --
> Greg
>


Re: [SPAM: 6.600] Re: [pygame] Re: removing 'experimental' notice from pygame.math

2018-03-03 Thread Russell Jones
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 in real physics!
>
> --
> Greg
>


Re: [SPAM: 5.011] [pygame] Re: removing 'experimental' notice from pygame.math

2018-03-03 Thread Greg Ewing

René Dudfield wrote:


Length is also confusing because... length of the container.


Yes, in Python terms the "length" of a vector should
really be the number of components it has.

(BTW, there's a similar problem in Python itself with using
len() for the size of containers in general. I find the
"length" of a dictionary to be a somewhat weird concept,
because I don't think of it as a linear data structure.
Even more so with sets!)

--
Greg



Re: [SPAM: 6.600] Re: [pygame] Re: removing 'experimental' notice from pygame.math

2018-03-03 Thread Greg Ewing

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