Lets first understand the problem, consider this figure-
We want to calculate ϴ, where we know A, B & O.
Now, if we want to get ϴ, we need to find out α and β first. For any straight line, we know-
y = m * x + c
Let- A = (ax, ay), B = (bx, by), and O = (ox, oy). So for the line OA-
oy =...