private static double interpolate(double x, ArrayList<Double> wavSupport, ArrayList<Double> funData ){
		double interpValue = 0;
		int index = -1;
		
		for(int i = 0; i < wavSupport.size(); i++){
			if(wavSupport.get(i) == x)
			{
				return funData.get(i);
			}
			else if(wavSupport.get(i) > x)
			{
				index = i;
				break;
			}
				
		} // end int i = 0; i < wavSupport.size(); i++
		
		if(index != -1)
		{
			// Using linear interpolation.
			double slope = ( funData.get(index) - funData.get(index - 1) ) / ( wavSupport.get(index) - wavSupport.get(index - 1) );
			interpValue = funData.get(index) + slope * (x - wavSupport.get(index));
		}// end if(index != -1)
		
		return interpValue;
		
		
		
	}// end interpolate method.