Answer the question
In order to leave comments, you need to log in
How to calculate the degree of rotation between points?
There are two points on the map point a = (55.7526, 37.57) and b = (55.7576, 37.58) An
object located on point a must have a turn angle to look at point b. Those. having these points, you need to calculate the degree of rotation.
Answer the question
In order to leave comments, you need to log in
You formulate incorrectly. You have not only 2 points. There cannot be a degree of rotation between two points. At point A, you have an oriented object with some angle. AB form a vector and the object is oriented by the vector. We need to find the angle between the vectors. It's easy to find how.
Or a line lies on AB. The second line also passes through A, but at a certain angle.
In short, you can use several views and solve the problem depending on your knowledge. This is a school program, so you most likely will not receive a specific answer.
1) consider the vector AB = B - A = (Bx - Ax, By - Ay) = (X, Y)
2) the angle is the arc tangent of X / Y. Many languages even have a function (like ATAN2) that just takes two arguments: X and Y.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question