📅  最后修改于: 2022-03-11 14:52:31.694000             🧑  作者: Mango
public static double[] pol(double x, double y) {
//return new double[]{Math.sqrt(x * x + y * y), Math.atan2(y, x)}; //red
return new double[]{Math.sqrt(x * x + y * y), (Math.atan2(y, x) * 180) / Math.PI}; //cart
}