pub fn cart_to_sph<T, S>(vectors: &VectorsGeneric<T, S>) -> Vectors<T>
Expand description
Convert a list of Vector
s from cartesian to spherical coordinates.
ยงExpression
$$\theta={\rm arctan2}\left(q_y, q_x\right)$$ $$\phi=\arcsin\left(\frac{q_z}{\left\Vert\bm{q}\right\Vert}\right)$$ $$\rho=\left\Vert\bm{q}\right\Vert$$
where $\theta$ is the azimuth, $\phi$ is the elevation, $\rho$ the radius, and $\bm{q}$ the cartesian vector.