## org.das2.datum.UnitsConverter

Units Converter object performs scale/offset conversions, but can also be used any double-to-double conversion, and contains an implementation to chain multiple conversions together.

## IDENTITY

No conversion, where convert trivially returns the value.

## LOOSE_IDENTITY

Allow conversion, but this is a flag that indicates the result should be dimensionless because the Ratiometric units were not convertible.

## TERA

## GIGA

## MEGA

## KILO

## MILLI

## CENTI

## MICRO

## NANO

## PICO

## append

append( org.das2.datum.UnitsConverter that ) → org.das2.datum.UnitsConverter

### Parameters

that - an UnitsConverter

### Returns:

org.das2.datum.UnitsConverter
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## convert

convert( double value ) → double

convert the value in the source units to the target units.

### Parameters

value - value in source units.

### Returns:

value in target units.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## convert

convert( Number number ) → Number

convert the value in the source units to the target units, preserving the data type. TODO: study where this is used, because it seems like the unit should determine its use. For example, Units.CDF_TT2000 might want Long.

### Parameters

number - value in source units.

### Returns:

value in target units.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getConverter

getConverter( Units fromUnits, Units toUnits ) → org.das2.datum.UnitsConverter

lookup the UnitsConverter object that takes numbers from fromUnits to toUnits. This will chain together UnitsConverters registered via units.registerConverter.

### Parameters

fromUnits - an Units
toUnits - an Units

### Returns:

UnitsConverter object
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getInverse

getInverse( ) → org.das2.datum.UnitsConverter

### Returns:

org.das2.datum.UnitsConverter
[search for examples] [view on GitHub] [view on old javadoc] [view source]