From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: Tank Movement Date: Tue, 06 Oct 1998 19:05:00 -0700 Organization: Alcyone Systems Lines: 19 Message-ID: <361ACC4C.51090927@alcyone.com> References: <36147a32 DOT 10039817 AT ct-news DOT iafrica DOT com> <6vebp7$sap$1 AT fir DOT prod DOT itd DOT earthlink DOT net> NNTP-Posting-Host: kamali.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (X11; I; Linux 2.0.30 i586) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com JEFF wrote: > The atan() function can only return values between -90 and 90 degrees, > which > is two out of four quandrants. You need to check the signs of v1 and > v2 to > determine if the angle is between -180 and -90 or between 90 and 180 > degrees and add or subtract 90 degrees accordingly. Or just use atan2. That's what it's for; no use reinventing the wheel. -- Erik Max Francis / email max AT alcyone DOT com / whois mf303 / icq 16063900 Alcyone Systems / irc maxxon (efnet) / finger max AT sade DOT alcyone DOT com San Jose, CA / languages En, Eo / web http://www.alcyone.com/max/ USA / icbm 37 20 07 N 121 53 38 W / &tSftDotIotE \ / Bachelors have consciences, married men have wives. / H.L. Mencken