UtilUnitConversionFactors Method (eumQuantity, eumQuantity, Double, Double, Boolean, Boolean) |
In case of success, the factor and offset contains the conversion values, that will convert from source to target using
target = source*factor + offset
The method will fail 1) if one of the units are undefined and undefinedAsSI is not set, or 2) if the units are not equivalent and unitsMustBeEquivalent is set. On failure, default values are used (scale is 1 and offset is 0). and false is returned
It can handle units that are not equivalent, i.e. if the target is kg/m3 and the source is g/s, and there is some processing (in proper units) between the target and the source, the conversion will take care of the factor 1000 here.
Namespace: DHI.Mike1D.Generic
public static bool UnitConversionFactors( eumQuantity target, eumQuantity source, out double factor, out double offset, bool unitsMustBeEquivalent, bool undefinedAsSI )
[Missing <returns> documentation for "M:DHI.Mike1D.Generic.Util.UnitConversionFactors(DHI.Generic.MikeZero.eumQuantity,DHI.Generic.MikeZero.eumQuantity,System.Double@,System.Double@,System.Boolean,System.Boolean)"]