Jump to content
• Advertisement

# Degrees to Radians

This topic is 4887 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

## Recommended Posts

Math has never been my strong point, but am I correct in saying the formula to convert from degrees to radians is... (degrees/180.0f)*D3DX_PI IE, to go from 0 to +1 to 0 to -1 to 0 when using SIN or COS you need to go from 0 to PI*2? Thanks Ray

#### Share this post

##### Share on other sites
Advertisement
you might have known that 360 degrees is 2PI...just checkout with 360 degrees and u'll find the above math is right...as simple as that !!

.kavitha

#### Share this post

##### Share on other sites
or..
radians = degrees * (D3DX_PI/180.0f)

I prefer this method, because you can pre-compute the D3DX_PI/180.0f value and save it in a constant, this'll save you a floating-point divide whenever you want to do the conversion.

#### Share this post

##### Share on other sites
Quote:
 Original post by pragma Furyor..radians = degrees * (D3DX_PI/180.0f)I prefer this method, because you can pre-compute the D3DX_PI/180.0f value and save it in a constant, this'll save you a floating-point divide whenever you want to do the conversion.

Ah, now that looks more readable!

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
Rutin
29
2. 2
3. 3
4. 4
5. 5
• Advertisement

• 13
• 13
• 11
• 10
• 13
• ### Forum Statistics

• Total Topics
632960
• Total Posts
3009473
• ### Who's Online (See full list)

There are no registered users currently online

×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!