Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / space_view3d / view3d_view.c
index 882f0ec0bc030b57bc8524b26594c6899d8e5686..880707f3b4bebabcf510109fd689dd90b34cb398 100644 (file)
@@ -273,7 +273,7 @@ void ED_view3d_smooth_view_ex(
                         * this means small rotations wont lag */
                        if (sview->quat && !sview->ofs && !sview->dist) {
                                /* scale the time allowed by the rotation */
-                               sms.time_allowed *= (double)angle_normalized_qtqt(sms.dst.quat, sms.src.quat) / M_PI; /* 180deg == 1.0 */
+                               sms.time_allowed *= (double)fabsf(angle_signed_normalized_qtqt(sms.dst.quat, sms.src.quat)) / M_PI; /* 180deg == 1.0 */
                        }
 
                        /* ensure it shows correct */
@@ -1069,7 +1069,7 @@ char ED_view3d_quat_to_axis_view(const float quat[4], const float epsilon)
        char view;
 
        for (view = RV3D_VIEW_FRONT; view <= RV3D_VIEW_BOTTOM; view++) {
-               if (angle_qtqt(quat, view3d_quat_axis[view - RV3D_VIEW_FRONT]) < epsilon) {
+               if (fabsf(angle_signed_qtqt(quat, view3d_quat_axis[view - RV3D_VIEW_FRONT])) < epsilon) {
                        return view;
                }
        }