It really depends on what you are looking for. The getTheta method I posted doesn't really do what you want.
This might
Code:
public static double getTheta(double x, double y){
double z = Math.atan2(y,x);
double degrees = z * (180.0 / Math.PI); // convert to degrees
degrees = (degrees > 0.0 ? degrees : (360.0 + degrees)); // correct discontinuity
System.out.println(degrees+"t");
return degrees;
}
The problem is that the joysticks don't give a robot an x and y component, they give a forward rate and turning rate components, which are different. I'm not really sure what you want.