You know, if I want a Pizza and I don't know how to make one...
1. I look in a Cookbook and follow the recipie (for Cookbook read PICBasic manual)...
2. I go to Cookery School and learn...
3. I at least make an attempt at something and if it doesn't turn out right then perhaps somebody will feel sorry for me and help me out...
4. I pay someone to bring it to my door...
I sure as hell don't run down the street shouting "I'm hungry and I want someone to make me a Pizza NOW!" and when neighbours offer their recipies and suggestions I dismiss them without at least trying to understand what they're offering me...
Quick (one minute of coding) and dirty 0-90 degree FREE Cosine demonstrator...
If you don't like it... go write your own...
If you want 91-359 Degrees... go write your own - it's not immediately obvious...
If you don't like the precision... go write your own...
...I think you get the idea...
Oh... and before you say anything to the contrary... yes it DOES work...Code:Angle Var WORD Cosine var WORD Radian var BYTE TempA var WORD TempB var WORD LCDOut $FE,1 Loop: For Angle=0 to 90 Gosub GetCosine LCDOut $FE,$80,"Angle=",#Angle," ",$FE,$C0,"Cosine=" LCDOut #Cosine DIG 3,".",#Cosine DIG 2,#Cosine DIG 1,#Cosine DIG 0 Pause 1000 Next Angle Goto Loop GetCosine: Radian=(Angle+1)*255/360 TempA=COS(Radian) TempA=TempA & %01111111 TempB=TempA*1000 Cosine=DIV32 127 Return




Bookmarks