mailr9479 - /1.3/maths_fns/rotation_matrix.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on September 08, 2009 - 17:43:
Author: bugman
Date: Tue Sep  8 17:43:36 2009
New Revision: 9479

URL: http://svn.gna.org/viewcvs/relax?rev=9479&view=rev
Log:
Bug fix for R_to_axis_angle().

All vector elements were NaN when the angle is 0.  Now the zero vector is not 
normalised by zero.


Modified:
    1.3/maths_fns/rotation_matrix.py

Modified: 1.3/maths_fns/rotation_matrix.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/maths_fns/rotation_matrix.py?rev=9479&r1=9478&r2=9479&view=diff
==============================================================================
--- 1.3/maths_fns/rotation_matrix.py (original)
+++ 1.3/maths_fns/rotation_matrix.py Tue Sep  8 17:43:36 2009
@@ -223,7 +223,8 @@
     theta = atan2(r, t-1)
 
     # Normalise the axis.
-    axis = axis / r
+    if r != 0.0:
+        axis = axis / r
 
     # Return the data.
     return axis, theta




Related Messages


Powered by MHonArc, Updated Tue Sep 08 18:00:02 2009