Calculation of angle and length. Cartasian to polar coordinates.