Michael M. answered 08/03/22
Tutor
New to Wyzant
Game Programmer and programming hobbyist
Pseudocode:
OnBeginClick: Store the mouse position
OnEndClick:
deltaX is currentMouseX - storedMouseX
deltaY is currentMoustY - storedMouseY
deltaY divided by deltaX = someValue (it's actually tangent(angle), we're about to calculate the angle)
arctangent(someValue) = angle