The list of methods to do Angle from Point are organized into topic(s).
double
getAngle(Point2D origin, Point2D target) get Angle
double angle = Math.toDegrees(Math.atan2((origin.getY() - target.getY()), (target.getX() - origin.getX())));
if (angle < 0) {
angle += 360;
return angle;
double
getAngle(Point2D p1, Point2D p2) get Angle
if (p1.equals(p2)) {
throw new IllegalArgumentException();
double a = -Math.atan2(p2.getY() - p1.getY(), p2.getX() - p1.getX());
a = a * 180.0 / Math.PI;
a -= 90;
if (a >= 360.0) {
a -= 360.0;
...
double
getAngle(Point2D.Double vertPt, Point2D.Double edgePt) get Angle
double dx = Math.abs(edgePt.x - vertPt.x), dy = Math.abs(edgePt.y - vertPt.y);
if (dx == 0.0D) {
if (edgePt.y > vertPt.y)
return Math.PI / 2.0D;
else
return 3 * Math.PI / 2.0D;
} else if (dy == 0.0D) {
if (edgePt.x > vertPt.x)
...
double
getAngleForPoint(Arc2D arc, int x, int y) get Angle For Point
double px = x - arc.getCenterX();
double py = arc.getCenterY() - y;
double d = Math.sqrt(px * px + py * py);
double a1 = Math.toDegrees(Math.acos(px / d));
double a2 = Math.toDegrees(Math.asin(py / d));
if (a2 < 0) {
if (a1 > 90)
return 360 - a1;
...