In Place Vector Operations?

Started by duckbob, February 18, 2006, 21:27:22

Previous topic - Next topic

duckbob

Is there really no built in way to do
Vector3f A = ...;
Vector3f B = ...;
A += B;

?

Where A is the same A it was with different values.

That being said, what is nessicary to compile the java side of LWJGL.  While there should be a differentation between mutation and creation of a independant result, mutation is critical for convience if nothing else.  Otherwise I will always have to call You.GetThisVector() which is just a pain.

Fool Running

QuoteIs there really no built in way to do
Vector3f A = ...;
Vector3f B = ...;
A += B;

?
Can you not just do Vector3f.add(A, B, A)? That should give you what you want. (I assume you know that you can't overload operators in Java so you weren't asking for that. :D )
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D