code: public static float distance(PointF p1, PointF p2){
          return (float) Math.sqrt(Math.pow((p2.x - p1.x), 2) + Math.pow(p2.y - p1.y,2));
      }
docs: Compute the distance between two points
  
  @param p1		the first point
  @param p2		the second point
  @return			the distance between the two points