Re: trig

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Sat, 17 Apr 2004 22:02:20 +0000, Lewis Townsend
<Keroltarr at hotmail.com> wrote:

>It seems I always forget my trig when I need it.
We all do blink
>Quick question:
>
>How do I calculate an angle in degrees given an x,y vector.
>The vector for 0 deg being {0,-1}
>90 deg would be {1,0}; 180 = {0,1}; etc...

I can't quite picture what you're saying, but I think of arctan(0)=0,
arctan(1)=45, and arctan(inf)=90, which I think should get you
started. I have to admit radians loose me, but in Eu:
?arctan(0)
?arctan(1)/(3.1415926/2)
?arctan(1e308)/(3.1415926/2)
prints:
0
0.5000000085
1.000000017

HTH,
Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu