Skip to content
Snippets Groups Projects
Commit 517eb6ca authored by Tim Molter's avatar Tim Molter
Browse files

more decimal formatting issues

parent bf0ae22f
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@ public class ScatterChart02 implements ExampleChart {
for (int i = 0; i < size; i++) {
double nextRandom = random.nextDouble();
xData.add(Math.pow(10, nextRandom * 10));
yData.add(1000000000.0 + nextRandom * 100);
yData.add(1000000000.0 + nextRandom);
}
// Create Chart
......
......@@ -77,10 +77,10 @@ public class NumberFormatter {
StringBuilder sb = new StringBuilder();
for (int i = maxNumPlaces - 1; i >= -1 * maxNumPlaces; i--) {
if (i >= 0 && (i < placeOfValue && i >= placeOfDifference)) {
if (i >= 0 && (i < placeOfValue)) {
sb.append("0");
}
else if (i < 0 && (i > placeOfValue && i >= placeOfDifference)) {
else if (i < 0 && (i > placeOfValue)) {
sb.append("0");
}
else {
......@@ -99,7 +99,7 @@ public class NumberFormatter {
private String getScientificDecimalPattern() {
return "0E0";
return "0.###############E0";
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment