[HepData-svn] r1809 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Jul 24 13:05:01 BST 2014


Author: watt
Date: Thu Jul 24 13:05:01 2014
New Revision: 1809

Log:
Write minus sign for down error if zero

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java	Thu Jul 24 13:03:04 2014	(r1808)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java	Thu Jul 24 13:05:01 2014	(r1809)
@@ -614,8 +614,8 @@
 					writer.write(e.getNormType().toSymbol());
 				    } else {
 					vale = new SignificantFigures(e.getPlus());
-					if(e.getPlus()<0.0){ writer.write(""); }
-					else                           { writer.write(" +"); }
+					if (e.getPlus()<0.0) { writer.write(""); }
+					else { writer.write(" +"); }
 					if (e.getNormType() == ErrorNorm.PCT) { lsd = vale.getLSD(); }
 					msd = vale.getMSD();
 					if (msd <= 0) msd = 1;
@@ -624,7 +624,8 @@
 					writer.write(e.getNormType().toSymbol());
 					vale = new SignificantFigures(e.getMinus());
 					if (e.getMinus()<0.0) { writer.write(","); }
-					else { writer.write(",+"); }
+					else if (e.getMinus()>0.0) { writer.write(",+"); }
+					else { writer.write(",-"); }
 					if (e.getNormType() == ErrorNorm.PCT) { lsd = vale.getLSD(); }
 					msd = vale.getMSD();
 					if (msd <= 0) msd = 1;


More information about the HepData-svn mailing list