Greetings! I am interested in atan2(x,y) and experiment with it, but I do not really know where it is used nor what it is used for.
I’ve already tried searching on youtube and google but it is still not too clear for me in a programming language.
It would be greatly appreciated if you would answer. Have a great day everyone!
When you’re converting from cartesian coordinates (x,y) to polar coordinates (r, θ), θ = arctan(y/x) for x > 0. For other coordinates you need to do a little bit more arithmetic.
math.atan2() will give you θ without the need to worry about the Quadrant. If you want to know a bit more about it, just look up atan2 as it is not exclusive to Roblox.