Math and Arithmetic
Java Programming

How do you calculate the point on the edge of a circle that corresponds to a degree given the radius of the circle?

Answer

Wiki User
01/29/2010

public void getPoint(double r, double angle)

{

//cosine*hypotenuse=adjasent

double x = r * Math.cos (Math.toRadians(angle))//in radians;

//sine * hypotenuse =opposite

double y=r*Math.sin(Math.toRadians(angle))//also in radians;

System.out.println("( "+x+", "+y+" )");

}