<<< Trigonometry     Index     Pythagorean theorem >>>

2. Radians


  • Why use radians? For us, primarily, because C/C++ library functions such as sin(x), cos(x), etc. take angle in radians.

  • The formula to calculate the circumference of a circle is 2*radius*PI

  • One radian is equivalent to 180/PI degrees

  • There are 2*PI radians in a circle

    one radian
  • 
    /* radian, sin(), and cos() example */
    #include <iostream>
    #include <cmath>
    using namespace std;
    
    #define PI 3.14159265
    
    int main ()
    {
        double degrees = 30.0;
        double result = sin( degrees * PI / 180 );
        cout << "The sine of "<< degrees << " degrees is "<< result << "\n";
        result = cos( degrees * PI / 180 );
        cout << "The cosine of "<< degrees << " degrees is "<< result << "\n";
        // radians = (PI / 180) * degrees
        // degrees = radians / (PI / 180) = radians * 180 / PI
        cout << "One radian is "<< 180 / PI << " degrees\n";
        return 0;
    }
    
    /*Output:
    The sine of 30 degrees is 0.5
    The cosine of 30 degrees is 0.866025
    One radian is 57.2958 degrees
    */
    
    

      degrees and radians


<<< Trigonometry     Index     Pythagorean theorem >>>