Given a vector going from a point $(x_0,y_0)$ to $(x_1,y_1)$ in a regular 2D-plane (i.e. an $\hat{x}$-axis pointing right and a $\hat{y}$-axis pointing up), I want to determine the angle between the vector and the $\hat{x}$-axis.
When the vector is in the first and second quadrant, the angle should be between $[0,-\pi]$, and between $[0,\pi]$ when it is in the third and forth quadrant. To clarify, a vector pointing in positive and negative $\hat{y}$-direction should have angle $-\frac{\pi}{2}$ and $\frac{\pi}{2}$, respectively.
What is the expression for the angle?