Are Cartesian and spherical coordinates smoothly compatible? And is the transition map a global diffeomorphism?

Consider the transition from spherical coordinates (r,θ,φ)(r, \theta, \varphi) to Cartesian coordinates (x,y,z)(x, y, z), given by the map
F:(0,∞)×[0,π]×[0,2π)→R3,(r,θ,φ)↦(x,y,z)F:(0,\infty) \times [0, \pi] \times [0, 2 \pi) \to \mathbb R^3,\qquad (r,\theta,\varphi)\mapsto (x,y,z)
where
x=rsinθcosφy=rsinθsinφz=rcosθ\begin{align}
x &= r \sin \theta \cos \varphi \\
y &= r \sin \theta \sin \varphi \\
z &= r \cos \theta
\end{align}
with the inverse relations
r=√x2+y2+z2θ=arccosz√x2+y2+z2=arccoszrφ=angle(y,x)\begin{align}
r&=\sqrt{x^2 + y^2 + z^2} \\
\theta &= \arccos\frac{z}{\sqrt{x^2 + y^2 + z^2}} = \arccos\frac{z}{r} \\
\varphi &= \text{angle}(y,x)
\end{align}
where the function angle:R2∖{0}→[0,2π)\text{angle}:\mathbb R^2\backslash\{0\}\to [0,2\pi) is defined (awkwardly) as
angle(y,x)={arctan(yx)if x>0 and y≥0arctan(yx)+2πif x>0 and y<0arctan(yx)+πif x<0+π2if x=0 and y>0+3π2if x=0 and y<0\begin{align}\label{eq:angle_function} \text{angle}(y,x)= \left\{ \begin{matrix} \arctan(\frac y x) &\text{if } x > 0 \text{ and } y\geq 0\\[2px]
\arctan(\frac y x) +2\pi &\text{if } x > 0 \text{ and } y< 0\\[2px] \arctan(\frac y x) + \pi &\text{if } x < 0 \\[2px] +\frac{\pi}{2} &\text{if } x = 0 \text{ and } y > 0 \\[2px]