Hello Guest

In Place Vector Operations?

  • 1 Replies
  • 4363 Views
In Place Vector Operations?
« on: February 18, 2006, 21:27:22 »
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.

hmmmmmm...
« Reply #1 on: February 21, 2006, 14:18:46 »
Quote
Is 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