> We want to go two left? This is sort of nice. > >>> velocity + Vector3.left * 2
Christening a particular axis or Vector as "left" had all kinds of problems. Which way is up? +y, like a graph? -y, like Surface coordinates? Is it a left-handed or right-handed coordinate system? On Tue, 27 Feb 2018, 21:56 Ian Mallett, <i...@geometrian.com> wrote: > (Skims discussion) > > For e.g. `abs(Vector2(2,-1).elementwise())`, my (C++) library instead > handles this as `abs(Vec2(2,-1))`, returning another `Vec2`. In C++, if you > weren't expecting that, you get a compile error on whatever happens next, > whereas in Python you'll get a `TypeError`, so it's well-defined. > > If you want the vector's length, I use a function, but perhaps it's more > pythonic to use a method: `Vec2(2,-1).getLength()`, or > `Vec2(2,-1).getLengthSq()`. > > If your vector represents a complex number and you're wondering why > `abs(...)` shouldn't return a complex modulus, then I ask why you aren't > using the built-in `complex`, which is designed for this. > > Ian >