First of all, I am doing some mathematical background information for a software I am creating.
What I want to achieve is the point on an object rotating towards where the mouse is. Like in tank games, where the turret rotated depending on
In terms of programming, this can be achieved by using the
atan2 function, that returns an angle between two points (I believe).
What I want to do is find the angle between an object, and mouse click.
Is there a special
maths formula for this? Because my research on google, brings 'atan2' since I'm a programmer. Since most languages have their own maths library, it is abstraction. I want to know how the formula works, in terms of maths.
The question is, what is the formula called for this; to find the angle between two points. So my object can rotate towards the