**New course!**Every coder should learn

**Generative AI!**

0

# Degree to radian

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

7 Answers

+ 1

360(deg) = 2*PI (rad)
1 (deg)= 2*PI / 360

+ 1

float degToRad(float d){
return d * 2* PI / 360.0f;
// or d*PI/180.0f
}

0

can we use this in code?

0

I posted a simple math equation like answer (you have to convert in code)

0

I knew what you said.. I dont know how to convert it?

0

you defined a function? tnx

0

Yes but if you dont want define it init a float var with after return content