private int GetBinIndexForSize( int size ) { if( size <= _binWidth ) { return 0; } int binIndex = ( ( size - _binWidth - 1 ) / _binWidth ) + 1; if( binIndex >= _nbOfBins ) { Debug.LogError( "no such bin" ); return -1; } return binIndex; }