state.cellY = ( ( state.y - state.radius ) / map->cellSize() );
state.cellY = ( ( state.y - wpMin<unsigned short>(state.y, state.radius) ) / map->cellSize() );
inline cUObject* nextObjectInCircle( IteratorState* is ){	MapObjectsGrid *map = is->map;	CircleIteratorState &state = is->state.circle;	do	{		// fetch next object within the current cell		MapObjectsGrid::Cell &cell = map->cell( is->cellId );		UI16 size = cell.size();		while ( is->i < size )		{			cUObject *object = cell[is->i++];			const Coord &pos = object->pos();			SI16 dx = ( pos.x - state.x );			SI16 dy = ( pos.y - state.y );			if ( ( ( dx * dx ) + ( dy * dy ) ) <= state.radius2 )			{				return object;			}		}		// we're done with the current cell, step into the next cell...		is->i = 0;		if ( ++state.cellY > state.lastCellY )		{			++state.cellX;			state.cellY = ( ( state.y - state.radius ) / map->cellSize() );			is->cellId = ( state.cellX * map->gridHeight() + state.cellY );		}		else		{			++is->cellId;		}	}	while ( state.cellX <= state.lastCellX );	is->valid = false;	return NULL;}