public class UnitsConverter
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static double |
convert(double value,
short fromUnit,
short toUnit)
Convert a double value from an unit to another one.
|
static float |
convert(float value,
short fromUnit,
short toUnit)
Convert a float value from an unit to another one.
|
static int |
convert(int value,
short fromUnit,
short toUnit)
Convert an int value from an unit to another one.
|
static long |
convert(long value,
short fromUnit,
short toUnit)
Convert a long value from an unit to another one.
|
public static float convert(float value, short fromUnit, short toUnit)
value
- the valuefromUnit
- the unit from which to converttoUnit
- the unit to which to convertpublic static int convert(int value, short fromUnit, short toUnit)
value
- the valuefromUnit
- the unit from which to converttoUnit
- the unit to which to convertpublic static long convert(long value, short fromUnit, short toUnit)
value
- the valuefromUnit
- the unit from which to converttoUnit
- the unit to which to convertpublic static double convert(double value, short fromUnit, short toUnit)
value
- the valuefromUnit
- the unit from which to converttoUnit
- the unit to which to convertCopyright ©2017-2023 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence