[NEWBIE] (Eular) Radians vs Degrees...

Started by
4 comments, last by Pure Krome 23 years, 3 months ago
G'Day all.. When people talk about Eular, do they mean that a circle is defied as 2PI radians? while in degress a circle is 360 Deg? so to get 1 degree, we divide PI over 180? eg. double piover180 = 3.1415 / 180.0; so if i want to move 35 degrees.. i do double result = 35 * piover180; ?? -PK- Edited by - Pure Krome on January 13, 2001 5:53:03 AM Edited by - Pure Krome on January 13, 2001 5:53:34 AM
-PK-
Advertisement
Well your calculation is correct but there''s not much point in using a double for 3.1415
How about this: 3.1415926535897932384626433832795
>> but there''s not much point in using a double for 3.1415

????

so what data type would u use for 3.1415?

tiny_double =P

??

-PK-
-PK-
quote:Original post by Pure Krome

>> but there''s not much point in using a double for 3.1415

????

so what data type would u use for 3.1415?

tiny_double =P

??

-PK-


float



Digital Radiation
Euler angles are not whether they are degrees or radians. IT jsut means using a set of rotations about the X, Y, and Z axes to determine total rotation. Unless you are systematic and careful, you can end up with different results because the order of the rotation matters. Hence quaternions.

If you are using gl calls, they take degrees, not radians, as arguments.

But if you find yourself needing to convert:

radians = PI*degrees/180.0;
degrees = 180.0*degrees/PI;

But you should use the double value of PI given. 3.1415 will be inaccurate.

All I did was pulled up the windows scientific calculator (in Accessories), hit PI and then pressed copy, and pasted it as a #define in my header

~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
~~~Cheers!Brett PorterPortaLib3D : A portable 3D game/demo libary for OpenGLCommunity Service Announcement: Read How to ask questions the smart way before posting!
or you could find some odd/half-assed way of doing it like THIS



ANDREW RUSSELL STUDIOS

This topic is closed to new replies.

Advertisement