Imagine 3 points (p1, p2 and p3) in 2D plane, i have the first vector starts from p1 to p2 and a second vector starts from p2 to p3. What is the angle between the extension of the first vector and the second vector?Here is a figure for more illustration
I have solved it in one quadrant, here is the link. But what if the 3rd point is in the second or the third quadrant?
Let use that: $$\cos \theta = \frac{r_1\cdot r_2}{|r_1||r_2|}\implies \theta = \arccos \frac{r_1\cdot r_2}{|r_1||r_2|}$$
with:
Example