문제

As much as I am confortable with using degrees I am unconfortable with using radians, which is much. This makes it a real pain for me to use radians for the trigo functions in eclipse. Is it possible to use the trigo functions with degrees instead of the default radians?

도움이 되었습니까?

해결책 2

There's a built-in function called Math.toDegrees(double) that you could call on your number to convert it into degrees. Does that work for you?

There's also a Math.toRadians(double) function as well.

http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html

다른 팁

java.lang.Math; method

static double toDegrees(double angrad) 

Converts an angle measured in radians to an approximately equivalent angle measured in degrees.

Reverse is also there

static double toRadians(double angdeg) 

Converts an angle measured in degrees to an approximately equivalent angle measured in radians.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top