Ejemplo n.º 1
0
    public static double u_given_px(double p, double x)
    {
        double ret_val;

        try
        {
            ret_val = IF97.umass_pQ(p / 1000000.0, x) * 1000f; //UNIT CONVERSION UNTESTED!
            return(ret_val);
        }
        catch (Exception ex)
        {
            Debug.Log(String.Format("Got an exception: {0}\nReturning {1}", ex.Message, u_neutral));
            got_error = true;
            return(u_neutral);
        }
        //return IF97.umass_pQ(p/1000000.0,x)*1000f; //UNIT CONVERSION UNTESTED!
    }