protected double updateDistance(double currDist,double diff){
  double result;
  result=currDist;
  diff=Math.abs(diff);
  if (diff > result)   result=diff;
  return result;
}

protected double updateDistance ( double currDist , double diff ) { double result ; result = currDist ; diff = Math . abs ( diff ) ; if ( diff > result ) result = diff ; return result ; }
updates the current distance calculated so far with the new difference between two attributes . the difference between the attributes was calculated with the difference ( int , double , double ) method .
