Commit 8cd819a9dff813f9fb9e639ea4e9e9a277b29271
1 parent
fe0fb87e
Exists in
master
Changed ABout to what version is : 2.6.9 - June 2019
Control : about CSU precision. Add rounding method when writing CSU calculation and slit/object positions
Showing
2 changed files
with
8 additions
and
3 deletions
Show diff stats
src/osp/ui/OSPE_AboutBoxPanel.java
... | ... | @@ -23,7 +23,7 @@ public class OSPE_AboutBoxPanel extends JDialog { |
23 | 23 | /** Product name */ |
24 | 24 | private String product = "OSP Editor"; |
25 | 25 | /** Current version */ |
26 | - private String version = "version 2.6.8 - May 16th 2019"; | |
26 | + private String version = "version 2.6.9 - June 25th 2019"; | |
27 | 27 | /** Copyright information */ |
28 | 28 | private String copyright = "Copyright (c)"; |
29 | 29 | /** Comments */ | ... | ... |
src/osp/ui/OspeControl.java
... | ... | @@ -9,6 +9,7 @@ import java.awt.geom.Point2D; |
9 | 9 | import java.io.File; |
10 | 10 | import java.io.FileWriter; |
11 | 11 | import java.io.IOException; |
12 | +import java.math.RoundingMode; | |
12 | 13 | import java.net.URL; |
13 | 14 | import java.nio.file.Paths; |
14 | 15 | import java.text.DecimalFormat; |
... | ... | @@ -1716,11 +1717,14 @@ WorldCoords wc = new WorldCoords(ptM.x,ptM.y); |
1716 | 1717 | |
1717 | 1718 | DecimalFormat nf; |
1718 | 1719 | nf = new DecimalFormat("000.000"); |
1719 | - | |
1720 | + nf.setRoundingMode(RoundingMode.HALF_EVEN); | |
1721 | + | |
1720 | 1722 | tab[i][0]=String.valueOf((int)idSlit); |
1721 | 1723 | tab[i][1]= nf.format(csup_left); |
1724 | + | |
1722 | 1725 | tab[i][2]=String.valueOf((int)idSlit2); |
1723 | 1726 | tab[i][3]=nf.format(csup_right); |
1727 | + | |
1724 | 1728 | if (isRef) tab[i][4]=String.valueOf((int)2); |
1725 | 1729 | else if (isJoined) tab[i][4]=joinedInfo; |
1726 | 1730 | else tab[i][4]=String.valueOf((int)affected); |
... | ... | @@ -1731,7 +1735,8 @@ WorldCoords wc = new WorldCoords(ptM.x,ptM.y); |
1731 | 1735 | tab[i][9]=nf.format(xr_left); |
1732 | 1736 | tab[i][10]=nf.format(yr_left); |
1733 | 1737 | tab[i][11]=nf.format(xr_right); |
1734 | - tab[i][12]=nf.format(yr_right); | |
1738 | + tab[i][12]=nf.format(yr_right); | |
1739 | + | |
1735 | 1740 | int v=joinedRefId+1; |
1736 | 1741 | tab[i][13]=String.valueOf((int)v); |
1737 | 1742 | isRef=false; | ... | ... |