Click or drag to resize

UtilUnitConversionFactors Method

Overload List
  NameDescription
Public methodStatic memberUnitConversionFactors(eumUnit, eumUnit, Double, Double, Boolean)
Calculate scale factor and offset for converting between eum units.

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 if one of the units are undefined, or 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.

Public methodStatic memberUnitConversionFactors(eumQuantity, eumQuantity, Double, Double, Boolean, Boolean)
Calculate scale factor and offset for converting between eum units.

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.

Public methodStatic memberUnitConversionFactors(eumUnit, eumUnit, Double, Double, Boolean, Boolean)
Calculate scale factor and offset for converting between eum units.

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.

Top
See Also