   how do i work out the angle between two points ?
  Proberly really thick question but im doing A* search algorithim and i need to know how work out the angle between an enemy and its goal so i can work out the fastest path.So id do,   dx = Item.x - Enemy.x (use absolute values here ?)   dy = Item.y - Enemy.y    if(dy == 0) {  //straight line east westif(dx < 0) go westelse go east}    if(dx == 0)   //straight line south north{if(dy > 0) go northelse go south}angle = dx/dy (are these absolute values ?)Confused what my test conditions would be for each north east, south east, north west, south west quadrents etc.I dont understand how i get my angle >_o.thx alot for any help.   
  I'd use atan2, or maybe a dot product (dot product works in higher dimensions as well, but only returns an angle <= 180º).   ;  Note that there's no such thing as an "angle between two points".  There can be an angle between two vectors, but those vectors will be defined by three points:  one common point where they both start, and two different endpoints.  (this could be four points if the vectors don't originate from the same point, but you can imagine moving one vector so both start from the same common point).It looks like what you want is the direction from one point to another, which is just a single vector, but which can also be expressed as an angle relative to another vector.  You can make this other vector straight "up", or straight to the "right".  Most commonly "right", or the x-axis is used for this purpose.If you use Cocalus' suggestion of atan2, I believe you supply it with the y and the x components of the vector you're checking.  This is equivalent to supplying the height and length of a right triangle, where the hypotenuse is the vector you're checking, and the sides are on the x-axis and perpendicular to the x-axis (if the vector is put at the origin).  The angle retured is the angle between the hypotenuse and the x-axis, positive or negative ranging from -180 to 180 degrees.  (it might give you a result in radians though... I'm not sure)   ;  in other words: what you need is heading from one point to other.Let dx,dy is direction to enemy.atan2(dy,dx) gives you angle that is measured counterclockwise from x axis, atan2(dx,dy) gives you angle that is measured clockwise from y axis.(assuming y to up and x to right)It's angles between x or y axis and direction to enemy.Generally, atan2(y,x) computes atan(y/x) and gives correct sign for all quadrants. [If you're confused you might need to search for tangent and arctangent and trigonometry.]   ;  thx all just what i was after :)   