I am not 100% sure what you mean by this. I suppose you could think of the input as a vector instead of 2 numbers.

Well, I believethe description concerning vector rotation is pretty clear. If you don't understand it, please point out exactly which word or phrase is not clear.

In trigonimetry it is customary to count angles from the OX axis, and positive angles rotate counterclockwise. E.g., OY axis makes +90 degrees. Here is a function that I believe returns the angle between OX and the given vector (x, y); the return angle is in the range 0 ... 360 degrees.

Code:

f(x,y) =
if x = 0
if y > 0 return 90
else if y = 0 return undefined
else if y < 0 return 270
else
let a = arctan(y / x) in
if x > 0
if y >= 0 return a // first quadrant
else return 360 + a // fourth quadrant
else return 180 + a // second and third quadrants

Now, angles between (0, -1) and (x, y) are computed by g(x,y) where

g(x,y) = f(-y,x)

This needs to be tested.

Edit: formatting.