Need help with a math issue: i need to get the true angle from 0 degrees using x and y cordinates im using this at the moment:
Math.atan((x2-x1)/(y1-y2))/(Ma
function angle(x1,y1,x2,y2) { eangle = Math.atan((x2-x1)/(y1-y2))/(Math.PI/180) if ( angle > 0 ) { if (y1 < y2) return angle; else return 180 + angle; } else { if (x1 < x2) return 180 + angle; else return 360 + angle; } }