private static float[][] diamondStep(float[][] map, int xSide, int ySide, float randomRange){
		
		float center = 0.0f;
		int xHalfSide = xSide/2;
		int yHalfSide = ySide/2;
		
		for(int x=0; x<map.length-1;x+=xSide){
			for(int y=0;y<map[0].length-1;y+=ySide){
				if(map[x+xHalfSide][y+yHalfSide] == 0.0f){
					center = ((map[x][y] +								// left upper corner
							 map[x + xSide][y]  + 						// right upper corner
							 map[x][y + ySide] + 						// left lower corner
							 map[x + xSide][y + ySide])/4.0f) +			// right lower corner
							 getRandom(randomRange*2, 0) - randomRange;
					
					if(center > 255.0f)
						center = 250.0f;
					
					if(center < 0.0f)
						center = 0.001f;
					
					map[x+xHalfSide][y+yHalfSide] = center;
				}
			}
		}
			
		return map;
	}