pub fn cartesian2cylindrical(cart_vec: &Vector3<f64>) -> Vector3<f64>
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