calculate angle and distance of point