diff options
Diffstat (limited to 'source/blender/editors')
4 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index f992309ed00..2dcddd01670 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -4906,7 +4906,7 @@ bool ed_editnurb_spin( copy_m3_m4(bmat, obedit->obmat); invert_m3_m3(imat, bmat); - axis_angle_to_mat3(cmat, axis, M_PI / 4.0); + axis_angle_to_mat3(cmat, axis, M_PI_4); mul_m3_m3m3(tmat, cmat, bmat); mul_m3_m3m3(rotmat, imat, tmat); diff --git a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c index 8d75e2aaf37..687f06c8dcf 100644 --- a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c +++ b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c @@ -44,7 +44,7 @@ # include "BKE_editmesh.h" #endif -static const float dial_angle_partial = M_PI / 2; +static const float dial_angle_partial = M_PI_2; static const float dial_angle_partial_margin = 0.92f; #define ORTHO_AXIS_OFFSET 2 diff --git a/source/blender/editors/space_view3d/view3d_navigate.c b/source/blender/editors/space_view3d/view3d_navigate.c index daf534ce0ba..50d7626a57d 100644 --- a/source/blender/editors/space_view3d/view3d_navigate.c +++ b/source/blender/editors/space_view3d/view3d_navigate.c @@ -1153,16 +1153,16 @@ static int view_axis_exec(bContext *C, wmOperator *op) float quat_test[4]; if (viewnum == RV3D_VIEW_LEFT) { - axis_angle_to_quat(quat_rotate, rv3d->viewinv[1], -M_PI / 2.0f); + axis_angle_to_quat(quat_rotate, rv3d->viewinv[1], -M_PI_2); } else if (viewnum == RV3D_VIEW_RIGHT) { - axis_angle_to_quat(quat_rotate, rv3d->viewinv[1], M_PI / 2.0f); + axis_angle_to_quat(quat_rotate, rv3d->viewinv[1], M_PI_2); } else if (viewnum == RV3D_VIEW_TOP) { - axis_angle_to_quat(quat_rotate, rv3d->viewinv[0], -M_PI / 2.0f); + axis_angle_to_quat(quat_rotate, rv3d->viewinv[0], -M_PI_2); } else if (viewnum == RV3D_VIEW_BOTTOM) { - axis_angle_to_quat(quat_rotate, rv3d->viewinv[0], M_PI / 2.0f); + axis_angle_to_quat(quat_rotate, rv3d->viewinv[0], M_PI_2); } else if (viewnum == RV3D_VIEW_FRONT) { unit_qt(quat_rotate); diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index f19b32e3ad4..3f7c7745bff 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -2059,7 +2059,7 @@ static float p_collapse_cost(PEdge *edge, PEdge *pair) a1 = a1 - M_PI / 3.0; a2 = a2 - M_PI / 3.0; a3 = a3 - M_PI / 3.0; - shapeold = (a1 * a1 + a2 * a2 + a3 * a3) / ((M_PI / 2) * (M_PI / 2)); + shapeold = (a1 * a1 + a2 * a2 + a3 * a3) / (M_PI_2 * M_PI_2); nshapeold++; } @@ -2068,7 +2068,7 @@ static float p_collapse_cost(PEdge *edge, PEdge *pair) a1 = a1 - M_PI / 3.0; a2 = a2 - M_PI / 3.0; a3 = a3 - M_PI / 3.0; - shapenew = (a1 * a1 + a2 * a2 + a3 * a3) / ((M_PI / 2) * (M_PI / 2)); + shapenew = (a1 * a1 + a2 * a2 + a3 * a3) / (M_PI_2 * M_PI_2); nshapenew++; } @@ -3730,7 +3730,7 @@ static float p_chart_minimum_area_angle(PChart *chart) minarea = 1e10; minangle = 0.0; - while (rotated <= (float)(M_PI / 2.0)) { /* INVESTIGATE: how far to rotate? */ + while (rotated <= (float)M_PI_2) { /* INVESTIGATE: how far to rotate? */ /* rotate with the smallest angle */ i_min = 0; mina = 1e10; @@ -3777,8 +3777,8 @@ static float p_chart_minimum_area_angle(PChart *chart) } /* try keeping rotation as small as possible */ - if (minangle > (float)(M_PI / 4)) { - minangle -= (float)(M_PI / 2.0); + if (minangle > (float)M_PI_4) { + minangle -= (float)M_PI_2; } MEM_freeN(angles); |