Revision: 49215
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49215
Author:   nazgul
Date:     2012-07-25 16:37:24 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Fix regression introduced in svn rev49122

Would rather have mathematical functions consistent from using
the same vector for input and output values point of view then
introducing questionable optimizations.

Revision Links:
--------------
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49122

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/math_rotation.c

Modified: trunk/blender/source/blender/blenlib/intern/math_rotation.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_rotation.c 2012-07-25 
16:30:53 UTC (rev 49214)
+++ trunk/blender/source/blender/blenlib/intern/math_rotation.c 2012-07-25 
16:37:24 UTC (rev 49215)
@@ -662,15 +662,16 @@
 /* Axis angle to Quaternions */
 void axis_angle_to_quat(float q[4], const float axis[3], const float angle)
 {
+       float nor[3];
 
-       if (LIKELY(normalize_v3_v3(q + 1, axis) != 0.0f)) {
+       if (LIKELY(normalize_v3_v3(nor, axis) != 0.0f)) {
                const float phi = angle / 2.0f;
                float si;
                si   = sinf(phi);
                q[0] = cosf(phi);
-               q[1] *= si;
-               q[2] *= si;
-               q[3] *= si;
+               q[1] = nor[0] * si;
+               q[2] = nor[1] * si;
+               q[3] = nor[2] * si;
        }
        else {
                unit_qt(q);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to