Converting Rads to degrees

To add comments, please log in or register
holocast
108
holocast  

Hello, please I want to know if there's a standard function that converts the rad value returned by acos() to degrees.


Many thanks in advance

Chidera Anakpe
3721
Chidera Anakpe  
holocast:

Hello, please I want to know if there's a standard function that converts the rad value returned by acos() to degrees.


Many thanks in advance

I'm not sure there is, but you can use a simple user defined function to convert it should the need arise in your code. 

Here is an example of what such code will look like

double RadToDegrees(double rad)                 //function name (passed radian value)
{double degree = rad*180/M_PI;                  //actual conversion is done here
 return(degree);                                //value in degrees is returned
}
holocast
108
holocast  
Chidera Anakpe:

I'm not sure there is, but you can use a simple user defined function to convert it should the need arise in your code. 

Here is an example of what such code will look like

Thank you so much it works perfectly
Chidera Anakpe
3721
Chidera Anakpe  
holocast:
Thank you so much it works perfectly
You're welcome 
To add comments, please log in or register