First, I apologize if this should be posted in a math forum.
But I haven't touch math for more than 3 years, now I need to wright a c++ program that needs the angle with 2 points on the screen.
This should be a simple math problem, but I just can't figure it out.
This image illustrates the question:
EDIT: problem solve, image removed.
There is a way to get the angle with the positive x-axis, arctangent. From there you should be able to convert it to your liking by doing some wizard-maths involving pi.
From you link it looks like what you want is the angle formed between a vertical line intersecting (x1, y1) and the line formed between the two given points. If this is so then you need this instead: