public static double t_given_ph(double p, double h) { double ret_val; try { ret_val = IF97.T_phmass(p / 1000000.0, h / 1000.0); //UNIT CONVERSION UNTESTED! return(ret_val); } catch (Exception ex) { Debug.Log(String.Format("Got an exception: {0}\nReturning {1}", ex.Message, t_neutral)); got_error = true; return(t_neutral); } //return IF97.T_phmass(p/1000000.0,h/1000.0); //UNIT CONVERSION UNTESTED! }