public static double absoluteBearingBetweenTwoPoints(double x, double y, double xx, double yy) {
		double xo = xx - x;
		double yo = yy - y;

		double dist = Point2D.distance(x, y, xx, yy);
		double arcSin = Math.toDegrees(Math.asin(xo/dist));
		double bearing = 0;

		if (xo > 0 && yo > 0) { // both pos: lower-Left
			bearing = arcSin;
		} else if (xo < 0 && yo > 0) { // x neg, y pos: lower-right
			bearing = 360 + arcSin; // arcsin is negative here, actuall 360 - ang
		} else if (xo > 0 && yo < 0) { // x pos, y neg: upper-left
			bearing = 180 - arcSin;
		} else if (xo < 0 && yo < 0) { // both neg: upper-right
			bearing = 180 - arcSin; // arcsin is negative here, actually 180 + ang
		}

		return bearing;
	}