I have a vector $(x,y) = (x_2 - x_1, y_2 - y_1)$. I have an arrow pointing to 0 degrees.
With vector $(x, y)$, how can I find the number of degrees (0 - 360) that will be the direction the arrow points in order for it to point from $v_1 = (x_1, y_1)$ to $v_2 = (x_2, y_2)$?
I am assuming that the arrow 'pointing to 0°' is pointing in $x$-direction of the coordinate system.
Then $\frac{y}{x} = \tan(\alpha-180°)$ where $\alpha$ is the angle you are looking for, because the vector $(x,y)$ is poiting from $v_2$ to $v_1$. That means $y/x$ is the slope of the line that goes throu $v_1$ and $v_2$. But you want the other direction thats why you have to substract (or add) 180°.