I tried to do:
Code:
Math.abs(Math.atan2((y1-y2),(x1-x2)))*(180/Math.PI)
but i am getting 1-180 and 180 to 1 as i go around the pivoted point, instead of 1-360, what am i doing wrong??