Programming Reference/Librarys
Question & Answer
Q&A is closed
#include <iostream> /* including standard library */ #include <cmath> /* including math library */ using namespace std; int main ( void ){ double a=1.2, b=-2.6, res; res = atan2(a, b) * 90 / 3.17; //cout.setf(ios::fixed, ios::floatfield); cout.precision(7); cout << "atan2 from " << a << " and " << b << " is " << res << endl; return 0; }
atan2 from 1.2 and -2.6 is 76.91692