# Thread: Trigonometry

1. Why is it: atan2 = 63.435 degrees, yet: tan(20/10) = -2.18... which would be the regular trigonometric way. (tan (angle) = opposite / adjacent.)... something to do with Vector?

A really weird discovery here, if you could shed some light I&#39;d be very thankful.

ArmA Values were determined by:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
nil = player spawn {_pos = getPos player; waitUntil {player distance _pos &#62; 10}; hint format &#91;&#34;%1&#34;,&#91;&#40;&#40;getpos player select 0&#41; - &#40;_pos select 0&#41;&#41;,&#40;&#40;getpos player select 1&#41; - &#40;_pos select 1&#41;&#41;,&#40;&#40;getpos player select 2&#41; - &#40;_pos select 2&#41;&#41;&#93;&#93;}
[/QUOTE]

Moving on a 45 degree bearing through the compass.

So why the degree divided by 3.3.

FYI, I came to this conclusion on multiple evidence, it was discovered via a 10 degree angle not equalling the math, I then noticed a pattern in the values, and noticed 33 degrees produced the values for 10, I then tried this for 45, then divided by 3 (rounded) and got the above values (close, but the rounded is obvious in the results).

I have since tried this for many different angles, with similiar results.

2. Make sure you are not confusing radians and degrees in your calculations. It can really mess you up if you don&#39;t notice this little error. From your description it is not clear to me if you know this already.

Calculating with TI-89 which is set to use degrees from "Mode->Angle":

sin(45)*10=7.07107
cos(45)*10=7.07107

You calculated in radians but gave the angle in degrees in your "correct math" results in the picture. You should of course get the same result for both sides of the triangle with an angle of 45 degrees.

Let&#39;s convert the 45 degrees into radians:

(Pi/180)*45 --&#62; 0.785398 radians

Calculating with TI-89 which is set to use radians from "Mode->Angle":

sin(0.785398)*10 = 7.07107
cos(0.785398)*10 = 7.07107

The "ArmA values" have been calculated by giving the angle in radians

Calculating with TI-89 which is set to use radians from "Mode->Angle":

sin(15)*10 = 6.50288
cos(15)*10 = -7.59688

Because, as I think, your description isn&#39;t very clear, I do not know if this actually solves your problem or not. Maybe you already knew this all and I just didn&#39;t understand your description of the problem.

3. ...

that explains a lot. explains interesting math grades too... only got the working out right...

thanks mate&#33;

(getting the right answers now...)

bloody radians... explains something I screwed up in physics too.. FKKKKKKKK

4. Good to hear that the problem was that simple. Because it was so simple, I wasn&#39;t sure if that was the problem at all

The same mistake is made in levels of higher education too so there is no need for you to put your head down in shame over this.

It&#39;s so easy mistake to make, but usually you notice it soon when you get weird results, like having a right-angled triangle which has its catheti not equal length when the angle is 45 degrees... which is of course impossible.

5. So by any chance was the 3.3 multiplication thing actually multiplying it by Pi (around) which was giving me false impression?

6. Well I had a feeling that it&#39;s probably Pi when I first read what you wrote about "3.3".

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•