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