Frage

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?

War es hilfreich?

Lösung 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

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top