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
This should do the trick:
Examples:
(x1,y1) = 0
(x2,y2) = (-1,1), atan() = -45, [add 360], 270 (x2,y2) = (1,1), atan() = 45 (x2,y2) = (1,-1), atan() = -45, [add 180], 135 (x2 ,y2) = (-1,-1), atan() = 45, [add 180], 225