Function coord_transforms::d2::cartesian2logpolar [] [src]

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

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( x2 + y2 ))
  • theta = arctan(y / x)