0
can anyone help me ot of this c code
sin of 90 degrees is not coming 1 and the value of the angles are not correct https://code.sololearn.com/c0CaVfAWFVbR/?ref=app
4 Respostas
+ 3
Math trig functions nearly always use radians. There are 2π rads in a circle. The conversion from degrees to radians is:
degrees * M_PI / 180
// To get π constant
#define _USE_MATH_DEFINES
// before #include math...
Your angle should also probably be a floating type, so it can be used to store the converted value.
+ 1
Cause these functions take a radian angle , you must transform from degree to radian
Radian = Degree * ( PI / 180 )
0
thanks man
0
thanks man