Commit e21f0f3f authored by Nico Mack's avatar Nico Mack

Changed default init of variable

parent 3de31f53
......@@ -67,6 +67,8 @@ public class NumericalVariable extends Variable<Double> {
// ***************************************************************************
public static final double DEFAULT_EPSILON = 1e-6;
public static final double DEFAULT_ROUNDING = 1e6;
public static final int DEFAULT_DECIMALS = 6;
private static final Logger LOGGER = LoggerFactory.getLogger(NumericalVariable.class.getSimpleName());
......@@ -129,7 +131,7 @@ public class NumericalVariable extends Variable<Double> {
private void initToDefaults() {
format = new DecimalFormat();
format.setDecimalSeparatorAlwaysShown(false);
format.setMaximumFractionDigits(0);
format.setMaximumFractionDigits(DEFAULT_DECIMALS);
format.setGroupingUsed(true);
DecimalFormatSymbols symbols = format.getDecimalFormatSymbols();
......@@ -142,7 +144,7 @@ public class NumericalVariable extends Variable<Double> {
valueRange = getValueRange(minValue, maxValue);
epsilon = DEFAULT_EPSILON;
scale = 1;
roundingFactor = 1;
roundingFactor = DEFAULT_ROUNDING;
}
// ---------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment