# How can I reshape a Function?

Following function is given.

y[x_]:=2*x


Now I need to reshape this function so that I get x dependent of y. So I should get a function like this:

x[y_]:=y/2


How can I use Mathematic to do this reshaping?

f[x_] := 2*x

InverseFunction[f][y]