Package org.gvsig.utils
Class DoubleUtilities
java.lang.Object
org.gvsig.utils.DoubleUtilities
This class has some methods to manage "Doubles"
- Author:
- Jorge Piera LlodrĂ¡ (piera_jor@gva.es)
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DoubleUtilities
public DoubleUtilities()
-
-
Method Details
-
format
public static double format(double value, char decimalSeparator, int decimalsNumber) Formats a double with an specified number of decimals. It removes the separator character of the integer part.- Parameters:
value- Separator char of the integer partdecimalSeparator- Separator char of the decimal partdecimalsNumber- Number of decimals- Returns:
- The formatted double
-
format
public static double format(double num, int n) Formats a double with an specified number of decimals.- Parameters:
num- Value to tailn- Number of decimals- Returns:
- The formatted double
-