Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: elmo2000 on January 20, 2011, 01:41:51 pm

Title: Math lib function atan2 gives wrong data
Post by: elmo2000 on January 20, 2011, 01:41:51 pm
Hi

When I use atan2 to calculate the angle from two vectors the angle returned is not very precice.
It deviates about 10 degrees converted to an angle from 0 to 360.

atan2(4.1,-12.1) results in 2.586 rad this should be 2.81 rad

seen in version 8 and 10 of code blocks.

Kind regards

Ruben
Title: Re: Math lib function atan2 gives wrong data
Post by: Jenna on January 20, 2011, 01:52:10 pm
Unrelated to C::B (it's "just" an IDE), therefore violating our forum rules (http://forums.codeblocks.org/index.php/topic,9996.0.html (http://forums.codeblocks.org/index.php/topic,9996.0.html)) .

Topic locked !