I\'m creating a simple 2D game in javascript/canvas. I need to figure out the angle of a certain object relative to my position.
So: say I\'m at (10,10) and the object i
In layman's terms:
function pointDirection(x1, y1, x2, y2) { return Math.atan2(y2 - y1, x2 - x1) * 180 / Math.PI; }