From: <ha...@us...> - 2010-03-11 13:10:29
|
Revision: 12602 http://jmol.svn.sourceforge.net/jmol/?rev=12602&view=rev Author: hansonr Date: 2010-03-11 13:10:17 +0000 (Thu, 11 Mar 2010) Log Message: ----------- version=11.9.33_dev # new feature: quaterion array .average .stddev using SphereMean Modified Paths: -------------- trunk/Jmol/src/org/jmol/util/Quaternion.java Modified: trunk/Jmol/src/org/jmol/util/Quaternion.java =================================================================== --- trunk/Jmol/src/org/jmol/util/Quaternion.java 2010-03-11 13:09:19 UTC (rev 12601) +++ trunk/Jmol/src/org/jmol/util/Quaternion.java 2010-03-11 13:10:17 UTC (rev 12602) @@ -728,10 +728,10 @@ Quaternion dq = data[i].div(mean); Vector3f v = dq.getNormal(); theta = dq.getTheta(); - v.scale(theta); + v.scale(theta / data.length); sum.add(v); } - Quaternion dqMean = new Quaternion(sum, sum.length() / data.length); + Quaternion dqMean = new Quaternion(sum, sum.length()); return dqMean.mul(mean); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |