Java examples for java.lang:Math Matrix
get Angle
public class Main{ public static double getAngle(Point p1, Point p2) { int x = p1.getX() - p2.getX(); int y = p1.getY() - p2.getY(); double angleToTarget = Math.atan2(x, y); return angleToTarget; }// w w w .j av a 2 s . c om }