Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Cordic functions... (http://www.chiefdelphi.com/forums/showthread.php?t=34531)

Zalumaskov 13-02-2005 00:12

Cordic functions...
 
I'm using the Cordic trig functions but I get weird values...

sin(0) and cos(0) both give me -4, you see my problem; what am I doing wrong?

Alan Anderson 13-02-2005 00:58

Re: Cordic functions...
 
Quote:

Originally Posted by Zalumaskov
I'm using the Cordic trig functions but I get weird values...

sin(0) and cos(0) both give me -4, you see my problem; what am I doing wrong?

How are you checking the return values? It could be something as simple as trying to printf a non-int using the %d format specifier, giving a bad answer onscreen while the value is perfectly fine.


All times are GMT -5. The time now is 17:54.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi