Revision: 20314
          http://sourceforge.net/p/jmol/code/20314
Author:   hansonr
Date:     2015-02-22 20:53:08 +0000 (Sun, 22 Feb 2015)
Log Message:
-----------
Jmol.___JmolVersion="14.2.12_2015.02.22b"

bug fix: JavaScript -2.format("%8.3") gives 2.000 not -2.000
bug fix: WRITE PDB broken
bug fix: minimizer treats hydrogen bonds as covalent single bonds

Modified Paths:
--------------
    branches/v14_2/Jmol/src/javajs/util/DF.java
    branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: branches/v14_2/Jmol/src/javajs/util/DF.java
===================================================================
--- branches/v14_2/Jmol/src/javajs/util/DF.java 2015-02-22 18:02:05 UTC (rev 
20313)
+++ branches/v14_2/Jmol/src/javajs/util/DF.java 2015-02-22 20:53:08 UTC (rev 
20314)
@@ -92,12 +92,14 @@
     if (decimalDigits >= formattingStrings.length)
       decimalDigits = formattingStrings.length - 1;
     String s1 = ("" + value).toUpperCase();
+    int pt = s1.indexOf(".");
+    if (pt < 0) // specifically JavaScript "-2" not "-2.0"
+      return s1 + formattingStrings[decimalDigits].substring(1);
     boolean isNeg = s1.startsWith("-");
-    if (isNeg)
+    if (isNeg) {
       s1 = s1.substring(1);
-    int pt = s1.indexOf(".");
-    if (pt < 0)
-      return s1 + formattingStrings[decimalDigits].substring(1);
+      pt--;
+    }
     int pt1 = s1.indexOf("E-");
     if (pt1 > 0) {
       n = PT.parseInt(s1.substring(pt1 + 1));

Modified: branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties     2015-02-22 
18:02:05 UTC (rev 20313)
+++ branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties     2015-02-22 
20:53:08 UTC (rev 20314)
@@ -5,8 +5,9 @@
 # THIS IS THE RELEASE BRANCH 
 # BUG FIXES ONLY, PLEASE
 
-Jmol.___JmolVersion="14.2.12_2015.02.22"
+Jmol.___JmolVersion="14.2.12_2015.02.22b"
 
+bug fix: JavaScript -2.format("%8.3") gives 2.000 not -2.000
 bug fix: WRITE PDB broken
 bug fix: minimizer treats hydrogen bonds as covalent single bonds
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to