Function coord_transforms::d3::cartesian2cylindrical
source · Expand description
Converts 3-d cartesian coordinates to 3-d cylindrical coordinates
Arguments
cart_vec
- Vector3 reference to the cartesian vector (x, y, z)
Return Value
nalgebra::Vector3<f64>
- rho, theta, z (in radians)
Formula
- rho = sqrt( x^2 + y^2 )
- theta = arctan(y / x)
- z = z