|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Trig problems
I have tried Kevin Watson's trig code with the eeprom, a cordic approach (team 226's code i think), and the default sin function in math.h and every time I come out with a wrong value when I print. I usually get 16512 or 0. I have tried switching from radians to degrees. Am I just getting unlucky or is there something I'm missing?
Code:
float meh;
angle = sin(3.14);
printf("the angle is = %d\r\n",meh );
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| speed of math.h trig functions? | Jared Russell | Programming | 4 | 07-02-2006 07:13 |
| Anyone Else Having Problems with Q&A on FIRST? | Windwarrior | General Forum | 6 | 25-01-2006 10:54 |
| Do you all have problems with.... | Munkaboo | Website Design/Showcase | 19 | 03-03-2003 19:51 |
| Radio problems -- not | archiver | 2000 | 1 | 23-06-2002 22:23 |