I want to get angles between two line. So I used this code.
int posX = (ScreenWidth) >> 1; int posY = (ScreenHeight) >> 1; double radians, de
If you simply use
radians = atan2f( y - posY , x - posX);
you'll get the angle with the horizontal line y=posY (blue angle).
y=posY
You'll need to add M_PI_2 to your radians value to get the correct result.
M_PI_2