Possible Duplicate:
Fast algorithm for polar -> cartesian conversion
I am running some pathfinding code (which is a bit slow) through jvisualvm, what I found was that 80% time is being spent in my vector implementation more specifically the part that convert cartesian to polar,
r = Math.sqrt((x * x) + (y * y));
t = Math.atan2(y,x);
are there any old school tricks that would get me some more performance?