pub fn cartesian2logpolar(cart_vec: &Vector2<f64>) -> Vector2<f64>
Expand description

Converts 2-d cartesian coordinates to 2-d log polar coordinates

Arguments

  • cart_vec - Vector2 reference to the cartesian vector (x, y)

Return Value

  • nalgebra::Vector2<f64> - rho, theta (in radians)

Formula

  • r = log(sqrt( x^2 + y^2 ))
  • theta = arctan(y / x)