There's a bug in Vector2f.setTheta(double)
The following
Code:
Log.debug("" + new Vector2f(91.4155775494873524));
Log.debug("" + new Vector2f(91.4155775494873524).getTheta());
gives me
Code:
Mon May 04 18:29:06 EDT 2009 DEBUG:[Vector2f 0.024703976,0.9996948 (1.0)]
Mon May 04 18:29:06 EDT 2009 DEBUG:88.58442246164603
The problem is line 56 of Vector2f that says
Code:
x = -len * (float) FastTrig.cos(StrictMath.toRadians(theta));
and instead should just be
Code:
x = len * (float) FastTrig.cos(StrictMath.toRadians(theta));