code: public static float distance (int x0, int y0, int x1, int y1)
      {
          return (float)Math.sqrt(((x1 - x0) * (x1 - x0)) +
                                  ((y1 - y0) * (y1 - y0)));
      }
docs: Return the distance between the given points.