Function tool::core::geometry::cart_to_sph[][src]

pub fn cart_to_sph<T>(vectors: &Vectors<T>) -> Vectors<T> where
    T: RealField, 

Convert a list of Vectors 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.