Re: ATn2() from Tools
  Home FAQ Contact Sign in
comp.lang.clipper only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.clipper Profile…
 Up
Re: ATn2() from Tools         


Author: dlzc
Date: Jun 11, 2008 14:39

Dear AUGE_OHR:

On Jun 11, 10:54 am, "AUGE_OHR" wrote:
> im looking for equivalent to ATn2() from "Tools".
> *** snip ***
> Purpose
>
> Calculates the radiant of an angle from sine
> and cosine
>
>  Syntax
>
> Atn2(  , ;
>        ;
>     ) --> nRadiant
>
> *** eof ***
>
> can someone show me how to do it with
> "pure" Cl*pper ?
Show full article (1.27Kb)
3 Comments
Re: ATn2() from Tools         


Date: Jun 11, 2008 18:17

hi,
>http://www.the-oasis.net/ftpmaster.php3?content=ftpgenrl.htm
>... down to trig.zip. (I do not know if he chose "ATAN" for the
>name... that is VFP-syntax.)

i have look at the-oasis and found that file but they do not have ATn2().

from German Xbase++ Forum (http://www.xbaseforum.de/) i got:

*** snip ***
FUNCTION ATN2(nSin,nCos)
LOCAL nPi := PI()
LOCAL nAngle := 0
Show full article (0.88Kb)
no comments
Re: ATn2() from Tools         


Date: Jun 11, 2008 18:26

hi,

i just saw a small differenz

my:
> nAngle:=nPi-aTan(nSin/-nCos)

your:
> RETURN PI() + ATAN(delta_y/delta_x)

hm ... i will test it again
... both give me same result ... funny

greetings by OHR
Jimmy
no comments
Re: ATn2() from Tools         


Author: N:dlzc D:aol T:com (dlzc)
Date: Jun 12, 2008 06:10

Dear AUGE_OHR:

"AUGE_OHR" wrote in message
news:g2q6p2$5g6$00$1@news.t-online.com...
...
> my:
>> nAngle:=nPi-aTan(nSin/-nCos)

Note the minus sign inside the aTan() function, in the
denominator.
> your:
>> RETURN PI() + ATAN(delta_y/delta_x)
>
> hm ... i will test it again
> ... both give me same result ... funny

No need. Roughly, 1 = -1 * ( -1 ). Trig can be a sneaky
ba*tard.

David A.Smith
no comments