samskivert / pythagoras

A portable library of geometry classes for Java
Apache License 2.0
44 stars 14 forks source link

Vector cross missing #10

Closed bootstraponline closed 12 years ago

bootstraponline commented 12 years ago

Vector3 has a cross method and I expect one for Vector as well. Pax uses libgdx's Vector2 cross method.

samskivert commented 12 years ago

That's a weird cross product method. It seems to be returning just the y component of the cross product.

bootstraponline commented 12 years ago

That could be why Pax renders incorrectly now that I've switched from libgdx's Vector2 to pythagoras Vector.

https://github.com/bootstraponline/Pax-Britannica-Java

samskivert commented 12 years ago

On Mon, Apr 30, 2012 at 3:10 PM, bootstraponline reply@reply.github.com wrote:

That could be why Pax renders incorrectly now that I've switched from libgdx's Vector2 to pythagoras Vector.

I think the problem is that you replaced a bunch of calls with libgdx methods that operate on the local vector with versions from Pythagoras that return a new vector. For example:

The Pythagoras version should be normalizeLocal().

I saw a bunch of similar errors in your diffs.

-- mdb@samskivert.com

bootstraponline commented 12 years ago

You're right. Thanks for letting me know.