Added polar/cartesian conversion functions