I am trying to find the angle between a reference point and other points, with given coordinates. For example, my reference point is (2,-2) and I want to find the angle between this point and another one, for example,(10,1). Normally I would perform double angle=atan(1-(-2)/10-2);
But this is not correct, because trig functions work only in radians. How can I find those angles?
Thanks
Let me ask in another way: I have a triangle and I am able to calculate tan of an angle, by dividing opposite/adjacent sides. Im order to get this angle value , I need to calculate the arc tan of the value I got before. This will not work in c++, since I need the tan in radians before. My mission here is to find the angle of a right triangle, given only its length sides.