Difference between revisions of "CPP/Math/Trig"
From ProgrammingExamples
< CPP
Daviddoria (Talk | contribs) (Created page with '==Trig.cpp== <source lang="cpp"> #include <cmath> #include <iostream> int main() { double x1 = 0; double y1 = 0; double x2 = 100; double y2 = 100; std::cout << 180.…') |
(No difference)
|
Revision as of 08:41, 23 June 2010
Trig.cpp
#include <cmath> #include <iostream> int main() { double x1 = 0; double y1 = 0; double x2 = 100; double y2 = 100; std::cout << 180./3.14159 * atan((x2-x1)/(y2-y1)) << std::endl; return 0; }