Skip to content
Snippets Groups Projects
Commit c0cc84ea authored by Klaus Becker's avatar Klaus Becker
Browse files

rad/degree umwandlung war genau falsch herum

refs 373
parent 11be7c8a
No related branches found
No related tags found
No related merge requests found
......@@ -59,18 +59,15 @@ public final class EllipseLayoutUtils {
}
/**
* returns a degree value for a given radian value
* returns a radian value for a given degree value
*
* @param rad
* (0-2pi)
* @return the degree (0-360)
* @param degree
* the degree (0-360)
*
* @return rad (0-2pi)
*/
public static double getDegreeFromRadian(double rad) {
if (rad >= 0 && rad <= Math.PI * 2) {
return (180 / Math.PI) * rad;
}
// else
return 0.0;
public static double getRadianFromDegree(double degree) {
return (Math.PI / 180.0) * degree;
}
/** Layouts the given connector within the surrounding ellipse. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment