I'm going to simulate a clock.
Imagine that, the segment between $(a, b)$ and $(x_1, y_1)$ it's the clock's hand.
I want to move $n$ degree from $(x_1, y_1)$ to $(x_2, y_2)$, and how i can get that $n$ degree?
And with that, how can I calculate it? I have been looking and I have seen that it is trigonometry, but I have not understood other answers, because they do not adapt to my problem.


Hint: If you let $$v_1=(x_1,y_1)-(a,b)=(x_1-a,y_1-a)$$ and $$v_2=(x_2,y_2)-(a,b)=(x_2-a,y_2-a)$$ then you can compute the cosine of the angle between $v_1$ and $v_2$ as $$\cos\theta = \frac{v_1\cdot v_2}{|v_1||v_2|}$$ where the numerator is the dot product and the denominator contains the product of the magnitudes.
This should let you find $\theta$ easily enough, right?