public static Double combinedGasLaw(Double p1, Double v1, Double t1, Double p2, Double v2, Double t2)
	{
		boolean[] nulls = new boolean[6];
		nulls[0] = (p1 == null);
		nulls[1] = (v1 == null);
		nulls[2] = (t1 == null);
		nulls[3] = (p2 == null);
		nulls[4] = (v2 == null);
		nulls[5] = (t2 == null);
		
		int nullCount = 0;
		for(int k = 0; k < nulls.length; k++)
		{
			if(nulls[k])
				nullCount++;
		}
		
		if(nullCount != 1)
			return null;
		
		double result = 0;
		
		if(nulls[0])
		{
			// p1 is unknown
			result = p2*v2*t1/(t2*v1);
		}
		else if(nulls[1])
		{
			// v1 is unknown
			result = p2*v2*t1/(t2*p1);
		}
		else if(nulls[2])
		{
			// t1 is unknown
			result = t2*p1*v1/(p2*v2);
		}
		else if(nulls[3])
		{
			// p2 is unknown
			result = p1*v1*t2/(t2*v1);
		}
		else if(nulls[4])
		{
			// v2 is unknown
			result = p1*v1*t2/(t1*p2);
		}
		else if(nulls[5])
		{
			// t2 is unknown
			result = t1*p2*v2/(p1*v1);
		}
		
		return result;
	}