Degrees to Radians
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
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
.kavitha
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement