Path: chuka.playstation.co.uk!news From: Eddie Harrison Newsgroups: scee.yaroze.beginners Subject: sin and cos Date: Thu, 22 Jul 1999 04:24:58 +0100 Organization: 24/7 Games Design Lines: 30 Message-ID: <37968F09.108DFABB@netscape.net> Reply-To: EddieHarrison@netscape.net NNTP-Posting-Host: tnt-10-5.easynet.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en]C-NECCK (Win95; I) 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; }