Пример #1
0
 public static double ParseExpressionByUnitId(string targetUnit, string expression)
 {
     return(ForgeUnitsEngine.parse(targetUnit, expression));
 }
Пример #2
0
 /// <summary>
 /// Parses a string containing values with units and math functions to a unit value.
 /// For example, "1ft + 2.54cm + 3in" could be converted to 14in
 /// </summary>
 /// <param name="targetUnit">Unit system to target</param>
 /// <param name="expression">String to convert to a value</param>
 /// <returns name="double">Converted value</returns>
 public static double ParseExpressionByUnit(Unit targetUnit, string expression)
 {
     return(ForgeUnitsEngine.parse(targetUnit.TypeId, expression));
 }