# Few trig questions. (How to calculate cos/sin/tan manually etc)

**URL:** <https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752>\
**Category:** flash\
**Created:** [August 30, 2003, 10:02am UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752 "2003-08-30T10:02:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![babywax](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@babywax](https://forum.kirupa.com/u/babywax)\
**Post date:** [August 30, 2003, 10:02am UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752/1 "2003-08-30T10:02:08Z")

</div>

Can someone write down the formulas that flash MX uses when you use the functions tan/sin/cos…  
I am trying to get a good grasp on these things and it would really help me a lot if someone could help 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2003, 11:11am UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752/2 "2003-08-30T11:11:13Z")

</div>

Math.tan  
Math.sin  
Math.cos

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2003, 3:15pm UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752/3 "2003-08-30T15:15:14Z")

</div>

in a right triangle:

sin (non-90 angle) = opp. side length / hypot.  
cos ("") = adj. side length / hypot.  
tan("") = opp. side length / adj. side length

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2003, 3:34pm UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752/4 "2003-08-30T15:34:37Z")

</div>

Haha trigonometry is one of my favorite topics in math! Best advice is to listen to your teacher in math! J/k :beam: Probably the easiest subject in my whole student life! lol

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2003, 3:45pm UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752/5 "2003-08-30T15:45:04Z")

</div>

in a triangle, a b and c being the sides (length) of the triangle and A B and C the angles opposed to side a b and c, you have:

a²=b²+c² - 2bc \* cos A

Harhar - I’ve got plenty of \*\*\*\* like that this year too…

[http://www.ping.be/~ping1339/gonio.htm](http://www.ping.be/%7Eping1339/gonio.htm)

basically trig is used for calculating coordinates and angles and everything

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2003, 10:30pm UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752/6 "2003-08-30T22:30:38Z")

</div>

So, if I have the X and Y of a point of a right triangle, how would I calculate where the radius is and/or the angle or the hypotenuse?  
I found somewhere on the net that to calculate the angle you do:  
Adjacent side length/Hypotenuse side length

To calculate the hypotenuse’ length you add together Adjacent squared and Opposite squared, and find the square root of those and you have the length of the hypotenuse…  
Sorry, I have yet to take trigonometry in school, thank you for the input 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2003, 11:52pm UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752/7 "2003-08-30T23:52:09Z")

</div>

Let me put it this way:  
What is the formula behind Math.atan2 ??? Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 31, 2003, 1:56am UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752/8 "2003-08-31T01:56:05Z")

</div>

```auto
Math.atan2 = function(y,x){
	if (x == 0){
		if (y < 0) return -Math.PI/2;
		else if (y > 0) return Math.PI/2;
		else return 0;
	}else if (x<0){
		if (y<0) return Math.atan(y/x) - Math.PI;
		else return Math.atan(y/x) + Math.PI;
	}else return Math.atan(y/x);
};

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 31, 2003, 3:22am UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752/9 "2003-08-31T03:22:09Z")

</div>

How about atan too(or the place where you got the info 😉 )? Thank you very much!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 31, 2003, 3:38am UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752/10 "2003-08-31T03:38:06Z")

</div>

did you read the rotating a vector post yet? that might help  
[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=12181](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=12181)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 31, 2003, 4:48am UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752/11 "2003-08-31T04:48:03Z")

</div>

Yes, I was just wondering what goes on behind the sine etc functions…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 31, 2003, 9:55am UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752/12 "2003-08-31T09:55:25Z")

</div>

[http://mathworld.wolfram.com/Trigonometry.html](http://mathworld.wolfram.com/Trigonometry.html)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 31, 2003, 11:10pm UTC](https://forum.kirupa.com/t/few-trig-questions-how-to-calculate-cos-sin-tan-manually-etc/29752/13 "2003-08-31T23:10:29Z")

</div>

Thanks 🙂
