Well, you appear to be using a cylindrical coordinate system so to get distance you need to convert to Cartesian coordinates, subtract, and then use Pythagoras. http://mathb.in/151353