# Degree Values after conversion [closed]

Hi All, I have few sets of pair coordinates. For each pair, i would like to get the value of the degree and here is my code

double deg = atan((b.y-a.y)/(b.x-a.x)) * 180 / PI;
std::cout << "deg" <<deg<< std::endl;
file<<deg<<",";


From the value, it can be resulted for 40 degree. As we know, there is another degree which similar to 40 degree which is 180+40 = 220 degree.

So far, by using the formula, i had never encountered a degree more than 180. Is it possible to have that value i.e 220 degree after arctan process?

edit retag reopen merge delete