Path: chuka.playstation.co.uk!news From: "Alex Herbert" Newsgroups: scee.yaroze.beginners Subject: Re: sin and cos Date: Sat, 24 Jul 1999 00:25:47 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 45 Message-ID: <7nasvr$6tn11@chuka.playstation.co.uk> References: <37968F09.108DFABB@netscape.net> NNTP-Posting-Host: 195.166.145.169 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Hi Eddie, You should find the Yaroze FAQ very helpful here. Check out the fixed-point maths and sin/cos sections: http://www.netyaroze-europe.com/yaroze/newmembers/yarfaq.htm Herbs Eddie Harrison wrote in message news:37968F09.108DFABB@netscape.net... > Does any 1 now how to use sin or cos in a game at the moment i am using > a bit of code i have borrowed which involves look up tables and i don't > understand it ( it from amatuer wars and uses a >>12 thing in it ) . i > have also looked at the section in the libary reference but like the > rest of the book it means nothing to me . if anyone know's which is > faster look up tables or the sin function please tell me . > here is my attempt so far at using lookup tables > > #include > #include "sincos.h" > > int main() > { > > int adjacent,oppisate,angle; > > angle = 32; > > adjacent = (SIN[angle]*10); > oppisate = (COS[angle]*10); > > printf("A triangle has a angle of %d\n",angle); > printf("and a hypotonuse of 10 so!!\n"); > printf("so it's adjacent side is %d long\n",adjacent); > printf("and its oppisate side is %d long\n\n",oppisate); > > > return 0; > } >