Solved! Go to Solution.
From the Analytic Geometry sections of some math handbooks:
The equation of a line passing through two points is: (y-y1)/(x-x1) = (y2-y1)/(x2-x1)
The general form of the equation for a straight line is: A*x + B*y + C = 0
The angle omega between two lines A1*x + B1*y +C1 = 0 and A2*x + B2*y + C2 = 0 is tan omega = (A1*B2 - B1*A2)/(A1*A2 + B1*B2)
You can do the math to convert the equation in two-points form to the general form to get the angle.
That's basic linear algebra. Use the dot product of 2 vectors to find the cosinus of the angle between these vectors.
Here is a way to do it. You can also use the math functions to do it as Lynn suggested.
I am aware that this thread is very old, but things gets much simpler if we use complex math. Try it!
So are you saying that the real solution is to use imaginary numbers?