Rotation towards joystick direction

I have a touch control joystick which gives me x and y values when it is used.
How do I use those values to rotate my object towards the direction the player is dragging the joystick?

I remember there being a really easy solution to this but I can’t remember it for the life of me. I also seem to be using wrong keywords while searching about it because I can’t find anything on the topic for some reason.

The short answer is to use Mathf.Atan2() to change the x,y into an angle in radians, then use Mathf.Rad2Deg to scale it up to degrees and make it useful.