[ANDROID] 두 점의 각도 구하기


[ANDROID] 두 점의 각도 구하기

두 점의 각도 구하는 방법 public static double angleOf(PointF p1, PointF p2) { // NOTE: Remember that most math has the Y axis as positive above the X. // However, for screens we have Y as positive below. For this reason, // the Y values are inverted to get the expected results. final double deltaY = (p1.y - p2.y); final double deltaX = (p2.x - p1.x); final double result = Math.toDegrees(Math.atan2(deltaY,..


원문링크 : [ANDROID] 두 점의 각도 구하기