cdm/src/main/java/ucar/nc2/units/SimpleUnit.java
public double convertTo(double value, SimpleUnit outputUnit) throws IllegalArgumentException {
    try {
      return uu.convertTo(value, outputUnit.getUnit());
    } catch (ConversionException e) {
      throw new IllegalArgumentException(e.getMessage());
    }
  }
public double convertTo(double value, SimpleUnit outputUnit) throws IllegalArgumentException {
    try {
      return uu.convertTo(value, outputUnit.getUnit());
    } catch (ConversionException e) {
      throw new IllegalArgumentException(e.getMessage());
    }
  }
public double convertTo ( double value , SimpleUnit outputUnit ) throws IllegalArgumentException { try { return uu . convertTo ( value , outputUnit . getUnit ( ) ) ; } catch ( ConversionException e ) { throw new IllegalArgumentException ( e . getMessage ( ) ) ; } }
Convert given value of this unit to the new unit.

@param value  value in this unit
@param outputUnit convert to this unit
@return  value in outputUnit
@throws IllegalArgumentException if outputUnit not convertible from this unit
Convert given value of this unit to the new unit .