From: "Thomas Annandale" Newsgroups: comp.os.msdos.djgpp Subject: Re: Help needed with a program I am writing Date: Mon, 6 Dec 1999 03:27:24 -0500 Organization: Georgia Institute of Technology, Atlanta GA, USA Lines: 35 Message-ID: <82frur$2ub$1@news-int.gatech.edu> References: <82f61g$54c$1 AT nntp8 DOT atl DOT mindspring DOT net> <384B316E DOT 91AE9766 AT snetch DOT cpg DOT com DOT au> NNTP-Posting-Host: r51h55.res.gatech.edu X-Trace: news-int.gatech.edu 944468763 3019 128.61.51.55 (6 Dec 1999 08:26:03 GMT) X-Complaints-To: usenet AT news DOT gatech DOT edu NNTP-Posting-Date: 6 Dec 1999 08:26:03 GMT X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Michael Abbott aka frEk <20014670 AT snetch DOT cpg DOT com DOT au> wrote in message <384B316E DOT 91AE9766 AT snetch DOT cpg DOT com DOT au>... >Heya > >Marp wrote: > >> P K wrote in message >> news:dPE24.416$wM4 DOT 28044 AT news-west DOT eli DOT net... >> >> >> > cos_table[a]=cos((float)a/180 * pi); >> > sin_table[a]=sin((float)a/180 * pi); >> >> I'm not sure why you get the error you do, but you want the a/180 to be >> calculated first, right? You have to surround that with parenthesis >> otherwise the 180 * pi gets calculated first (order of operations) and you >> get a different number from the one you want. > >I'm not sure about that one... Isn't * on the same level as / which means that >anything on that level gets calculated from left to right? Correct me if I'm >wrong :) > >- Michael > Yeah, you're right. Marp is dumb. -Thomas http://www.prism.gatech.edu/~gte829m