public static int numPixelsBetween(int x1,int y1,int x2,int y2){
  return (int)Math.sqrt(Math.pow((double)(x1 - x2),2.0) + Math.pow((double)(y1 - y2),2.0));
}

public static int numPixelsBetween ( int x1 , int y1 , int x2 , int y2 ) { return ( int ) Math . sqrt ( Math . pow ( ( double ) ( x1 - x2 ) , 2.0 ) + Math . pow ( ( double ) ( y1 - y2 ) , 2.0 ) ) ; }
little math utility that both tools use , that just implements the pythagorean theorem to do the number of pixels between two screen points .
