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

fixed angle interpretation to be 90° at north

refs 303
parent 6670b8f7
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ import org.fortiss.tooling.base.model.layout.ILayoutedModelElement;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 80B631B5B2032BFAD1D1161DC0549957
* @ConQAT.Rating YELLOW Hash: 8C0D9FE6F0557C583EE2EACDBEC6D146
*/
public final class EllipseLayoutUtils {
/**
......@@ -169,6 +169,9 @@ public final class EllipseLayoutUtils {
/**
* Class for storing polar coordinates.
*
* The angles are interpreted in the following way: 0: East; 90(pi/2):
* North; 180(pi): West; 270(3/2pi): South
*
* @author wandinger
* @author hummel
* @author $Author$
......@@ -198,7 +201,7 @@ public final class EllipseLayoutUtils {
/** Returns a cartesian representation. */
public Point toCartesian() {
int x = (int) (distance * Math.cos(angle));
int y = (int) (distance * Math.sin(angle));
int y = (int) (distance * Math.sin(angle)) * (-1);
return new Point(x, y);
}
}
......
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