private long normalizeMax(long l) { int exp = (int) Math.log10((double) l); long multiple = (long) Math.pow(10.0, exp); int i = (int) (l / multiple); l = (i + 1) * multiple; return l; }
public void setDecimals(int decimals) { this.decimals = decimals; this.decimalsMultiplier = Math.pow(10.0, decimals); }