Getting the angle from a direction vector?

I have this simple function to set an angle for a vector. It effectively gets the vector’s current magnitude (length), calulates the angle and converts the angle from radians to degrees. Then I apply the angle to X and Y, lastly multiplying the vector by it’s original magnitude. However I am unsure how to obtain (get) an angle from a Vector. Below is my attempt: This attempt doesn’t return any value except 0 or -1. Any suggestions? Edit: Correct method: Answer