Decrease precision in ENG mode and migrate the settings
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
package org.solovyev.common;
|
||||
|
||||
import static java.lang.Math.pow;
|
||||
|
||||
import static midpcalc.Real.NumberFormat.FSE_ENG;
|
||||
import static midpcalc.Real.NumberFormat.FSE_FIX;
|
||||
import static midpcalc.Real.NumberFormat.FSE_NONE;
|
||||
import static midpcalc.Real.NumberFormat.FSE_SCI;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
|
||||
@@ -7,12 +14,6 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import midpcalc.Real;
|
||||
|
||||
import static java.lang.Math.pow;
|
||||
import static midpcalc.Real.NumberFormat.FSE_ENG;
|
||||
import static midpcalc.Real.NumberFormat.FSE_FIX;
|
||||
import static midpcalc.Real.NumberFormat.FSE_NONE;
|
||||
import static midpcalc.Real.NumberFormat.FSE_SCI;
|
||||
|
||||
public class NumberFormatter {
|
||||
|
||||
public static final char NO_GROUPING = 0;
|
||||
@@ -20,6 +21,7 @@ public class NumberFormatter {
|
||||
public static final int DEFAULT_MAGNITUDE = 5;
|
||||
public static final int MIN_PRECISION = 1;
|
||||
public static final int MAX_PRECISION = 15;
|
||||
public static final int ENG_PRECISION = 10;
|
||||
|
||||
private final Real.NumberFormat numberFormat = new Real.NumberFormat();
|
||||
private final Real real = new Real();
|
||||
|
Reference in New Issue
Block a user