What is the potential function of the field $\left(\frac{-y}{x^2+y^2},\frac{x}{x^2+y^2}\right)$ The vector field is obviously conservative on every closed domain that doesn't encompass the point $(0,0)$, so there must be a potential function.
I've got $\arctan(\frac{x}{y})$ for $x$ unequal to zero and $\arctan(\frac{y}{x})$ for $y$ unequal to zero.
However, when I try to find the line integral of the given field from point $(1,0)$ to point $(0,1)$ I get $\frac{\pi}{2}$, but when I try to find the result by using the potential function I get $0$.
What am I doing wrong?
Thanks in advance.

Given the potential in the answer by @RRL, a potential in Cartesian coordinates could be, for $y\geq0,$ and $(x,y)\neq(0,0)$
$$
f(x,y)=\arccos\left(\frac{x}{\sqrt{x^2+y^2}}\right)
$$
