diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 12 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 4 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_parametrizer.c | 6 |
6 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 765937256c6..2bd9bba365b 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -3864,7 +3864,7 @@ static void switchdirection_knots(float *base, int tot) fp1 = base; fp2 = tempf = MEM_mallocN(sizeof(float) * a, "switchdirect"); while (a--) { - fp2[0] = fabs(fp1[1] - fp1[0]); + fp2[0] = fabsf(fp1[1] - fp1[0]); fp1++; fp2++; } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 527eb9b966b..079b64f852c 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3364,11 +3364,11 @@ static bool ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, if ((is_float == true) && (softrange > 11)) { /* non linear change in mouse input- good for high precicsion */ - data->dragf += (((float)(mx - data->draglastx)) / deler) * (fabsf(mx - data->dragstartx) / 500.0f); + data->dragf += (((float)(mx - data->draglastx)) / deler) * ((float)abs(mx - data->dragstartx) / 500.0f); } else if ((is_float == false) && (softrange > 129)) { /* only scale large int buttons */ /* non linear change in mouse input- good for high precicsionm ints need less fine tuning */ - data->dragf += (((float)(mx - data->draglastx)) / deler) * (fabsf(mx - data->dragstartx) / 250.0f); + data->dragf += (((float)(mx - data->draglastx)) / deler) * ((float)abs(mx - data->dragstartx) / 250.0f); } else { /*no scaling */ @@ -3487,8 +3487,8 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton float fac; #ifdef USE_DRAG_MULTINUM - data->multi_data.drag_dir[0] += fabsf(data->draglastx - mx); - data->multi_data.drag_dir[1] += fabsf(data->draglasty - my); + data->multi_data.drag_dir[0] += abs(data->draglastx - mx); + data->multi_data.drag_dir[1] += abs(data->draglasty - my); #endif fac = 1.0f; @@ -3770,8 +3770,8 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton } else if (event->type == MOUSEMOVE) { #ifdef USE_DRAG_MULTINUM - data->multi_data.drag_dir[0] += fabsf(data->draglastx - mx); - data->multi_data.drag_dir[1] += fabsf(data->draglasty - my); + data->multi_data.drag_dir[0] += abs(data->draglastx - mx); + data->multi_data.drag_dir[1] += abs(data->draglasty - my); #endif if (ui_numedit_but_SLI(but, data, mx, true, event->ctrl != 0, event->shift != 0)) ui_numedit_apply(C, block, but, data); diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 12737976436..c762c82442e 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1147,7 +1147,7 @@ static void calc_ortho_extent(KnifeTool_OpData *kcd) BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) { for (i = 0; i < 3; i++) - max_xyz = max_ff(max_xyz, fabs(v->co[i])); + max_xyz = max_ff(max_xyz, fabsf(v->co[i])); } kcd->ortho_extent = max_xyz; } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 2775d5521d0..d0edecb5489 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -638,9 +638,9 @@ static bool sculpt_brush_test_cube(SculptBrushTest *test, float co[3], float loc mul_v3_m4v3(local_co, local, co); - local_co[0] = fabs(local_co[0]); - local_co[1] = fabs(local_co[1]); - local_co[2] = fabs(local_co[2]); + local_co[0] = fabsf(local_co[0]); + local_co[1] = fabsf(local_co[1]); + local_co[2] = fabsf(local_co[2]); if (local_co[0] <= side && local_co[1] <= side && local_co[2] <= side) { float p = 4.0f; @@ -719,7 +719,7 @@ static float overlapped_curve(Brush *br, float x) for (i = 0; i < n; i++) { float xx; - xx = fabs(x0 + i * h); + xx = fabsf(x0 + i * h); if (xx < 1.0f) sum += BKE_brush_curve_strength(br, xx, 1); diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index c7e6c4598fc..b0eb8d20554 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -1036,7 +1036,7 @@ static void spotvolume(float lvec[3], float vvec[3], const float inp) static void draw_spot_cone(Lamp *la, float x, float z) { - z = fabs(z); + z = fabsf(z); glBegin(GL_TRIANGLE_FAN); glVertex3f(0.0f, 0.0f, -x); @@ -1251,7 +1251,7 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, glTranslatef(0.0, 0.0, x); if (la->mode & LA_SQUARE) { float tvec[3]; - float z_abs = fabs(z); + float z_abs = fabsf(z); tvec[0] = tvec[1] = z_abs; tvec[2] = 0.0; diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index 40d2cc7dcd2..105f3a835f3 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -2821,9 +2821,9 @@ static void p_chart_pin_positions(PChart *chart, PVert **pin1, PVert **pin2) float sub[3]; sub_v3_v3v3(sub, (*pin1)->co, (*pin2)->co); - sub[0] = fabs(sub[0]); - sub[1] = fabs(sub[1]); - sub[2] = fabs(sub[2]); + sub[0] = fabsf(sub[0]); + sub[1] = fabsf(sub[1]); + sub[2] = fabsf(sub[2]); if ((sub[0] > sub[1]) && (sub[0] > sub[2])) { dirx = 0; |