12 lines
237 B
Java
12 lines
237 B
Java
|
package net.mc_pandacraft.java.util;
|
||
|
|
||
|
public class StringUtil {
|
||
|
public static String formatDouble(double d)
|
||
|
{
|
||
|
if(d == (long) d)
|
||
|
return String.format("%d",(long)d);
|
||
|
else
|
||
|
return String.valueOf((float)d);
|
||
|
}
|
||
|
}
|