I've been a bad student

I can remember some elementary math heh
anyway, could someone help me out with this little problem?

A is a static dot, let’s say A(x,y)
C(x,y) is the dot of a possible click (could be anywhere)

now i want to know how to calculate the angle that the line A(x,y)and C(x,y) does with the line made by the horizontal passing by A(x,y)

TiA :cool:


angleInRadians = Math.atan2(C.y-A.y, C.x-A.x);
angleInDegrees = angleInRadians * 180/Math.PI;

thanks !!! :slight_smile: :slight_smile:

welcome :beam: