public static double generateRandomDoubleBetween(int min, int max, int sigFigs)
	{
		if(max == min)
			return min;
		
		if(max - min < 0)
		{
			int temp = min;
			max = min;
			max = temp;
		}
		
		double r, //range
			   v; //value
		
		//calculate number of sigFigs
		sigFigs = (int) Math.pow(10,sigFigs);
		
		//calculate random number between max and min
		r = min + (Math.random() * (max - min));
		
		//truncate to sigFigs number of decimal places
		v = (int)(r * sigFigs);
		v /= sigFigs;
		
		return v;
	}