###

» Wed Jul 13, 2016 8:59 pm

Tangent: Given an angle, will return the ratio of the opposite edge over the adjacent edge.

Arctan: Is the inverse of tangent, you input the ratio (based on difference between x and y coordinates of your two points), and get the angle.

The angle expression is a shortcut that uses atan(), except you input the actual coordinates instead of the ratio.

So angle(0,0,10,20) is equal to atan(2). (Difference in Y is your opposite value 20, difference in X is 10 would be your adjacent value. 20/10 would be your ratio of 2).

Alternatively, you can look at it as angle(ax,ay,bx,by) = atan((by-ay)-(bx-ay))

Mistakes were made.