mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-06 20:43:11 +00:00
[trunk] Fix formatCurrency and roundDouble (it breaks on non-us locales)
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1381 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
a41a7e60b1
commit
abc22d4e21
1 changed files with 2 additions and 2 deletions
|
@ -261,11 +261,11 @@ public class Util
|
||||||
|
|
||||||
public static String formatCurrency(double value)
|
public static String formatCurrency(double value)
|
||||||
{
|
{
|
||||||
return "$" + Double.valueOf(df.format(value));
|
return "$" + df.format(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static double roundDouble(double d)
|
public static double roundDouble(double d)
|
||||||
{
|
{
|
||||||
return Double.valueOf(df.format(d));
|
return Math.round(d*100.0)/100.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue