public static double round(double value,double factor){
  return (Math.round(value / factor) * factor);
}

public static double round ( double value , double factor ) { return ( Math . round ( value / factor ) * factor ) ; }
round the value to the nearest factor .
