Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java cartesian to polar

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
}
 
PREVIOUS NEXT
Tagged: #java #cartesian #polar
ADD COMMENT
Topic
Name
2+2 =