private int findBin(double value){
  return FastMath.min(FastMath.max((int)FastMath.ceil((value - min) / delta) - 1,0),binCount - 1);
}

private int findBin ( double value ) { return FastMath . min ( FastMath . max ( ( int ) FastMath . ceil ( ( value - min ) / delta ) - 1 , 0 ) , binCount - 1 ) ; }
returns the index of the bin to which the given value belongs
