Path: chuka.playstation.co.uk!news From: "pal" Newsgroups: scee.yaroze.freetalk.english Subject: Re: Maths Functions? Date: 28 Aug 2001 10:32:07 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 25 Message-ID: <01c12fa1$247d0de0$LocalHost@pal-s-omnibook> References: <9mdpv0$1sb3@www.netyaroze-europe.com> <9mdqcu$1sb4@www.netyaroze-europe.com> <9mdt9h$1sb6@www.netyaroze-europe.com> <9mduur$1sb9@www.netyaroze-europe.com> <9mdvpo$1sb11@www.netyaroze-europe.com> <9me19v$1sb12@www.netyaroze-europe.com> <9me3et$1sb14@www.netyaroze-europe.com> NNTP-Posting-Host: nas-cbv-2-31-15.dial.proxad.net X-Newsreader: Microsoft Internet News 4.70.1155 Just make your array two-dimensional: distanceXY[MAXX][MAXY]; angleXY[MAXX][MAXY]; In your case, I think like Kenny that the lookup table is the way to go. Incidentally, have a look at hypot(x,y) p.281. pal Chris Wallace wrote in article <9me3et$1sb14@www.netyaroze-europe.com>... > Cheers, might come in usefull... the problem is, from what i can see, that > only gives the distance on the X and Y seperately. I want the distance, (in > pixels will do) that its moved by taking the X distance and the Y distance > and using pythag to find out the lengh of the other side. > Would it just be easier to use trig to find out the angle and the trig again > for the lengh? or would that be too inaccurate.. while im on the point, how > do you do Sin to the -1 thingy?? > Chirs