/** * Converts a numeric value from this unit to the underlying derived unit. * * @param amount * The numeric value in this unit. * @return The equivalent value in the underlying derived unit. * @throws ConversionException * Can't convert value to the underlying derived unit. */ public float toDerivedUnit(final float amount) throws ConversionException { return (float) toDerivedUnit((double) amount); }
/** * Converts a numeric value from this unit to the underlying derived unit. * * @param amount * The numeric value in this unit. * @return The equivalent value in the underlying derived unit. * @throws ConversionException * Can't convert value to the underlying derived unit. */ public float toDerivedUnit(final float amount) throws ConversionException { return (float) toDerivedUnit((double) amount); }
.println("nauticalMile.raiseTo(2)=" + nauticalMile.raiseTo(2)); System.out.println("nauticalMile.toDerivedUnit(1.)=" + nauticalMile.toDerivedUnit(1.)); System.out .println("nauticalMile.toDerivedUnit(new float[]{1,2,3}, new float[3])[1]=" + nauticalMile.toDerivedUnit(new float[] { 1, 2, 3 }, new float[3])[1]); System.out.println("nauticalMile.fromDerivedUnit(1852.)="
.println("nauticalMile.raiseTo(2)=" + nauticalMile.raiseTo(2)); System.out.println("nauticalMile.toDerivedUnit(1.)=" + nauticalMile.toDerivedUnit(1.)); System.out .println("nauticalMile.toDerivedUnit(new float[]{1,2,3}, new float[3])[1]=" + nauticalMile.toDerivedUnit(new float[] { 1, 2, 3 }, new float[3])[1]); System.out.println("nauticalMile.fromDerivedUnit(1852.)="