private boolean same(double d1,double d2,double tolerance){
  return (Math.abs(d1 - d2) < tolerance);
}

private boolean same ( double d1 , double d2 , double tolerance ) { return ( Math . abs ( d1 - d2 ) < tolerance ) ; }
tests two doubles for ' near enough ' equality .
