Package io.keikai.doc.collab.lib0
Class Metric
- java.lang.Object
-
- io.keikai.doc.collab.lib0.Metric
-
public class Metric extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static doubleATTOstatic doubleCENTIstatic doubleDECAstatic doubleDECIstatic doubleEXAstatic doubleFEMTOstatic doubleGIGAstatic doubleHECTOstatic doubleKILOstatic doubleMEGAstatic doubleMICROstatic doubleMILLIstatic doubleNANOstatic doublePETAstatic doublePICOstatic doubleTERAstatic doubleYOCTOstatic doubleYOTTAstatic doubleZEPTOstatic doubleZETTA
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MetricPrefixprefix(double n)static MetricPrefixprefix(double n, int baseMultiplier)Calculate the metric prefix for a number.
-
-
-
Field Detail
-
YOTTA
public static final double YOTTA
- See Also:
- Constant Field Values
-
ZETTA
public static final double ZETTA
- See Also:
- Constant Field Values
-
EXA
public static final double EXA
- See Also:
- Constant Field Values
-
PETA
public static final double PETA
- See Also:
- Constant Field Values
-
TERA
public static final double TERA
- See Also:
- Constant Field Values
-
GIGA
public static final double GIGA
- See Also:
- Constant Field Values
-
MEGA
public static final double MEGA
- See Also:
- Constant Field Values
-
KILO
public static final double KILO
- See Also:
- Constant Field Values
-
HECTO
public static final double HECTO
- See Also:
- Constant Field Values
-
DECA
public static final double DECA
- See Also:
- Constant Field Values
-
DECI
public static final double DECI
- See Also:
- Constant Field Values
-
CENTI
public static final double CENTI
- See Also:
- Constant Field Values
-
MILLI
public static final double MILLI
- See Also:
- Constant Field Values
-
MICRO
public static final double MICRO
- See Also:
- Constant Field Values
-
NANO
public static final double NANO
- See Also:
- Constant Field Values
-
PICO
public static final double PICO
- See Also:
- Constant Field Values
-
FEMTO
public static final double FEMTO
- See Also:
- Constant Field Values
-
ATTO
public static final double ATTO
- See Also:
- Constant Field Values
-
ZEPTO
public static final double ZEPTO
- See Also:
- Constant Field Values
-
YOCTO
public static final double YOCTO
- See Also:
- Constant Field Values
-
-
Method Detail
-
prefix
public static MetricPrefix prefix(double n, int baseMultiplier)
Calculate the metric prefix for a number.- Parameters:
n- The number to calculate the prefix for.baseMultiplier- The multiplier of the base (10^(3*baseMultiplier)). Default is 0.- Returns:
- An object containing the scaled number and the metric prefix.
-
prefix
public static MetricPrefix prefix(double n)
-
-