cos() , sin() functions not returning corect value
the cos() and sin() functions are not returning the corect value! when i put in a value it gives me some wacky answer like cos(180) = -0.59846006905786 when it is actually equal to -1 acording to my £6 calculator and the coalculator program on widows. HELP this is very anoying!!!
~prevail by daring to fail~
That''s because it expects radians in, not normal 360 degreed...
Multiply the number you want to cos by ( PI / 180.0f ) and it will work correctly.....
the phrase rtm springs to mind ;-)
Game production:
Good, quick, cheap: Choose two.
Multiply the number you want to cos by ( PI / 180.0f ) and it will work correctly.....
the phrase rtm springs to mind ;-)
Game production:
Good, quick, cheap: Choose two.
Game production:Good, quick, cheap: Choose two.
what does rtm meen???? and is there a way to set the defult to be degrees not rads?
~prevail by daring to fail~
~prevail by daring to fail~
RTM means Read The Manual. RTFM is more common, "Read the F''ing Manual"
You could write your own function that uses degrees. But the reason the functions are in Radians is because the Math world uses Radians, not degrees.
Epolevne
You could write your own function that uses degrees. But the reason the functions are in Radians is because the Math world uses Radians, not degrees.
Epolevne
Yep Yep! So does Physics! Learned that the hard way when I was coding a trajectory function! =)
Windows 98/SE/ME SUCKS!
Deal with it!
if(windows crashes)
run Linux
else
yeah right!!
RESIST WINDOWS XP!!!!!!!!!!
RESIST .NET TECH!!!!!!!!!!!
Windows 98/SE/ME SUCKS!
Deal with it!
if(windows crashes)
run Linux
else
yeah right!!
RESIST WINDOWS XP!!!!!!!!!!
RESIST .NET TECH!!!!!!!!!!!
Radians are kind of cool after a while, but I heard there''s a metric degree or something of the sort where 100 metric degrees is a complete circle. I think that would be even better.
A CRPG in development...
Need help? Well, go FAQ yourself.
A CRPG in development...
Need help? Well, go FAQ yourself.
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
I prefer brads (256 per circle) and wrads (65536 per circle). Put them in a lookup table and you can have high speed rotation in the perfect computer friendly format.
May 29, 2001 02:42 PM
I totally disagree with the RTM/RTFM thing. If everyone reads the manual (or in this case the help file), there will never be any more questions that I understand and can actually correctly answer
quote:
Original post by Nazrix
Radians are kind of cool after a while, but I heard there''s a metric degree or something of the sort where 100 metric degrees is a complete circle. I think that would be even better.
I seem to remember (vaguely) about something called Gradiens, (gradients?), in which the circle is divided up into 400 degree''s, 100 degrees for each quadrant.
im not sure if we are referring to the same thing.
===============================================
But as for me, hungry oblivion
Devour me quick, accept my orison
My earnest prayers Which do importune thee,
With gloomy shade of thy still empery,
To vail both me and my poesy
This is my signature. There are many like it, but this one is mine. My signature is my best friend. It is my life. I must master it as I must master my life. My signature, without me, is useless. Without my signature, I am useless.
Yes,
2 pi rads = 360 degrees = 400 gradients... I have never seen anyone actually use gradients but perhaps there is some kind of advantage in using them.
Radians are the most common i math for a number of reasons. Radians are nice because they relate to the length of the circular sector. An angle of one pi rads is equal to 180 degrees but one pi rads is also the length of the arch between 0 and 180 degrees if the radius is one (a unit circle). I Hope you understand what I''m trying to say![](smile.gif)
Snale
+--My humble and superior homepage
2 pi rads = 360 degrees = 400 gradients... I have never seen anyone actually use gradients but perhaps there is some kind of advantage in using them.
Radians are the most common i math for a number of reasons. Radians are nice because they relate to the length of the circular sector. An angle of one pi rads is equal to 180 degrees but one pi rads is also the length of the arch between 0 and 180 degrees if the radius is one (a unit circle). I Hope you understand what I''m trying to say
![](smile.gif)
Snale
+--My humble and superior homepage
Snale+--My humble and superior homepage
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement