Replies: 1 comment 2 replies
That's interesting! Right now the Py5Vector will reject a negative value for the
I did some experimenting and I see that this is valid Processing code: PVector v = new PVector();
v.normalize();
println(v);
// [ 0.0, 0.0, 0.0 ]py5 would reject the similar code, not allowing you to normalize a vector with a magnitude of zero. This does bother me a bit, but being consistent with Processing is probably the better choice. And if this is allowed in py5, using |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
In Processing you can set the magnitude of a vector to a negative scalar... this will "flip" the heading...
Yesterday at Noite de Processing we were jamming and live coding a "ParticleLife" that was handy...
My solution was:
Could there be a less costly solution inside Py5Vector?
Also Processing "fails silently" to set magnitude to a "null vector". Should we follow that?
All reactions