For each of the piecewise-defined functions, determine whether or not the function is one-to-one, and if it is, determine its inverse function.

\(\displaystyle{f{{\left({x}\right)}}}={\left\lbrace\begin{array}{cc} {x}&{w}{h}{e}{n}\ {x}{<}{0}\\{2}{x}&{w}{h}{e}{n}\ {x}\ge{0}\end{array}\right.}\)