+0

# Simple equation for tangent

0
364
2

What is the exact equation to get the output number from the ONE input number in the tan operation? I am searching the internet to find it, and I even tried searching the code of calculators to get the equation, but I failed to obtain the formula that has only one input number. I need to know because I am using a coding language (thyme) that does not have tan, atan, asin, acos, sec, asc, etc, but it has sin and cos, and doing vector calculus without it is hard. What I am trying to achieve is to have a ring of circles, spaced randomly apart, move toward a central point with an x and y velocity system. I have the velocity thing done, but not the angle. Here is the angle code bit: angle := atan2(scene.my._y - e.this.pos(1), scene.my._x - e.this.pos(0)) the bolded word is the problem. The scene.my._x and scene.my._y are the coordinates for the central point, if you have Algodoo, try it. I hope this doesn't feel like it should be on a coding question board, so it is going to the off-topic board.

off-topic
Aug 12, 2017

#1
+27849
0

Have a look at:  http://www.embedded.com/design/other/4216719/Performing-efficient-arctangent-approximation

Aug 12, 2017
#2
0

I still don't get it, because I dont know where to start or what to define the variables as.

Guest Aug 12, 2017