 		// with i and j we can get the grid point coordinates in the source grid
 		
 		point gp = d_grid[Index(i,j,targetInfo.size_x)];
-		
+
 		if (sourceInfo.wraps_globally && (gp.x < 0 || gp.x > sourceInfo.size_x - 1))
 		{
 			// wrap x if necessary

		
		double interp = kFloatMissing;
		
		if (
			// if interpolated grid points are negative, it means that we are outside
			// of the source area
				
			// sometime first grid point is -0, so we substrace a small value from first
			// grid point accept that value as well
				
			gp.x >= (0 - kEpsilon) && gp.y >= (0 - kEpsilon) &&
				
			// if interpolated grid points are larger than source grid in x or y
			// direction, it means again that we are outside of the area
			
			__double2uint_ru(gp.x) <= sourceInfo.size_x && __double2uint_ru(gp.y) <= sourceInfo.size_y
		)
		{
			
			//targetInfo.interpolation = himan::kNearestPointValue;

	point c(floor(gp.x), floor(gp.y));
	point d(ceil(gp.x), floor(gp.y));

	// Assure neighboring points are inside grid
	
	size_t size_x = sourceInfo.size_x;
	size_t size_y = sourceInfo.size_y;
	
	if (!IsInsideGrid(a, size_x, size_y) || !IsInsideGrid(b, size_x, size_y) || !IsInsideGrid(c, size_x, size_y) || !IsInsideGrid(d, size_x, size_y))
	{
		return ret;
	}
	
	// Neighbor values

	double av = d_source[Index(a,size_x)];
	double bv = d_source[Index(b,size_x)];
	double cv = d_source[Index(c,size_x)];
	double dv = d_source[Index(d,size_x)];	

	// Find mode of neighboring points

