mirror of https://github.com/kami-blue/client
add rounder to infocalc
This commit is contained in:
parent
ca99df0e3d
commit
86d8917613
|
@ -97,4 +97,11 @@ public class InfoCalculator extends Module {
|
|||
return formatter.format(date);
|
||||
}
|
||||
/* End of time */
|
||||
|
||||
/* Round */
|
||||
public static double round(double value, int places) {
|
||||
double scale = Math.pow(10, places);
|
||||
return Math.round(value * scale) / scale;
|
||||
}
|
||||
/* End of round */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue