0

Degree to radian

how can we convert degree to radian for sine etc. ?

18th May 2018, 6:56 AM
yalda_student
yalda_student - avatar
7 Respuestas
+ 1
360(deg) = 2*PI (rad) 1 (deg)= 2*PI / 360
18th May 2018, 7:25 AM
KrOW
KrOW - avatar
+ 1
float degToRad(float d){ return d * 2* PI / 360.0f; // or d*PI/180.0f }
18th May 2018, 7:35 AM
KrOW
KrOW - avatar
0
can we use this in code?
18th May 2018, 7:28 AM
yalda_student
yalda_student - avatar
0
I posted a simple math equation like answer (you have to convert in code)
18th May 2018, 7:29 AM
KrOW
KrOW - avatar
0
I knew what you said.. I dont know how to convert it?
18th May 2018, 7:31 AM
yalda_student
yalda_student - avatar
0
you defined a function? tnx
18th May 2018, 7:36 AM
yalda_student
yalda_student - avatar
0
Yes but if you dont want define it init a float var with after return content
18th May 2018, 7:38 AM
KrOW
KrOW - avatar