By-The-Way, the person you copied from got ArcTan backwards.
Or, I guess you could say: since 1961 the function itself is the one that’s backwards
ArcTan(Y, X)
*because that’s how “atan2” is written on paper… (not X,Y!) so you might wanna swap that.
Don’t be afraid to try out some of the official guides - they might not seem related at first, but if you look through their code for the tuts and example maps you will start making sense of things over time.
Take a quick read about “RACE” concurrency (just 4 minutes of your time, trust me!) - it might not make much sense at first, but at least you will know what is in the page if you need to refer back later.