Revision: 20764 http://sourceforge.net/p/jmol/code/20764 Author: hansonr Date: 2015-09-09 11:34:26 +0000 (Wed, 09 Sep 2015) Log Message: ----------- reconciling javajs.util with swingjs project; correcting exponential digits in %8.3e or %8.-3f
Modified Paths: -------------- trunk/Jmol/src/javajs/util/Measure.java trunk/Jmol/src/javajs/util/PT.java Modified: trunk/Jmol/src/javajs/util/Measure.java =================================================================== --- trunk/Jmol/src/javajs/util/Measure.java 2015-09-09 03:54:37 UTC (rev 20763) +++ trunk/Jmol/src/javajs/util/Measure.java 2015-09-09 11:34:26 UTC (rev 20764) @@ -258,6 +258,26 @@ ptProj.add2(pt, vNorm); } + /** + * + * @param ptCenter + * @param ptA + * @param ptB + * @param ptC + * @param isOutward + * @param normal set to be opposite to direction of ptCenter from ABC + * @param vTemp + * @return true if winding is CCW; false if CW + */ + public static boolean getNormalFromCenter(P3 ptCenter, P3 ptA, P3 ptB, P3 ptC, + boolean isOutward, V3 normal, V3 vTemp) { + float d = getNormalThroughPoints(ptA, ptB, ptC, normal, vTemp); + boolean isReversed = (distanceToPlaneV(normal, d, ptCenter) > 0); + if (isReversed == isOutward) + normal.scale(-1f); + return !isReversed; + } + public final static V3 axisY = V3.new3(0, 1, 0); public static void getNormalToLine(P3 pointA, P3 pointB, Modified: trunk/Jmol/src/javajs/util/PT.java =================================================================== --- trunk/Jmol/src/javajs/util/PT.java 2015-09-09 03:54:37 UTC (rev 20763) +++ trunk/Jmol/src/javajs/util/PT.java 2015-09-09 11:34:26 UTC (rev 20764) @@ -1122,7 +1122,7 @@ ++ich; } if (isExponential) - precision = -precision - 1; + precision = -precision; } String st = strFormat.substring(ich, ich + len); if (!st.equals(key)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits