Rectangular to polar conversion of vector