tdf#104268 NLPSolver: Improve display of solution
Format "%.2f" is not optimal for large or small values. Format "%g" should be prefered. Change-Id: I92899d80564b9000b1f3e049221c456f8e1176a9 Reviewed-on: https://gerrit.libreoffice.org/31445 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
d5d6ee3b3e
commit
0412d863d1
@@ -177,7 +177,7 @@ public class EvolutionarySolverStatusUno extends BaseDialog
|
||||
}
|
||||
|
||||
public void setBestSolution(double solution, boolean feasible) {
|
||||
lblSolutionValue.setLabel(String.format("%.2f", solution));
|
||||
lblSolutionValue.setLabel(String.format("%g", solution));
|
||||
if (feasible)
|
||||
lblSolutionValue.setTextColor(defaultTextColor);
|
||||
else
|
||||
|
Reference in New Issue
Block a user