diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-04 10:55:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-04 10:55:29 +0400 |
commit | deec4ce0bc77519f68392bc5b29ef211a31f1588 (patch) | |
tree | 81865ab303df791e61d9b50e849c53791be0ce0a /source/blender/editors | |
parent | a05fdb837b89f2fba04587e99d0eecaa9cf174c3 (diff) |
Code Cleanup: avoid double promotion.
Diffstat (limited to 'source/blender/editors')
6 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 9b7c49023c5..93cb0f8ae97 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -1533,8 +1533,8 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc zoomx= (float)width / (scopes->track_preview->x-2*margin); zoomy= (float)height / (scopes->track_preview->y-2*margin); - off_x= ((int)track_pos[0]-track_pos[0]+0.5)*zoomx; - off_y= ((int)track_pos[1]-track_pos[1]+0.5)*zoomy; + off_x= ((int)track_pos[0]-track_pos[0]+0.5f)*zoomx; + off_y= ((int)track_pos[1]-track_pos[1]+0.5f)*zoomy; drawibuf= scale_trackpreview_ibuf(scopes->track_preview, track_pos, width, height, margin); diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index dbc153de108..c528d8cd078 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -109,7 +109,7 @@ static float get_fluid_viscosity(FluidsimSettings *settings) return 2.0e-3; case 1: /* manual */ default: - return (1.0/pow(10.0, settings->viscosityExponent)) * settings->viscosityValue; + return (1.0f/powf(10.0f, settings->viscosityExponent)) * settings->viscosityValue; } } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index ce84e43955b..d05582512ae 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3153,7 +3153,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, dx = cache->mouse[0] - cache->initial_mouse[0]; dy = cache->mouse[1] - cache->initial_mouse[1]; - cache->vertex_rotation = -atan2(dx, dy) * cache->bstrength; + cache->vertex_rotation = -atan2f(dx, dy) * cache->bstrength; sd->draw_anchored = 1; copy_v2_v2(sd->anchored_initial_mouse, cache->initial_mouse); diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c index 6a56de26689..f902422ab43 100644 --- a/source/blender/editors/space_clip/clip_graph_ops.c +++ b/source/blender/editors/space_clip/clip_graph_ops.c @@ -450,7 +450,7 @@ void CLIP_OT_graph_view_all(wmOperatorType *ot) void ED_clip_graph_center_current_frame(Scene *scene, ARegion *ar) { View2D *v2d = &ar->v2d; - float extra = (v2d->cur.xmax - v2d->cur.xmin) / 2.0; + float extra = (v2d->cur.xmax - v2d->cur.xmin) / 2.0f; /* set extents of view to start/end frames */ v2d->cur.xmin = (float)CFRA - extra; diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c index 2bb40ce51f4..c13a5202c19 100644 --- a/source/blender/editors/space_sequencer/sequencer_scopes.c +++ b/source/blender/editors/space_sequencer/sequencer_scopes.c @@ -170,7 +170,7 @@ static struct ImBuf *make_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) for (x = 0; x < ibuf->x; x++) { unsigned char * rgb = src + 4 * (ibuf->x * y + x); - float v = (float)rgb_to_luma_byte(rgb) / 255.0; + float v = (float)rgb_to_luma_byte(rgb) / 255.0f; unsigned char * p = tgt; p += 4 * (w * ((int) (v * (h - 3)) + 1) + x + 1); diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 41e7356ad10..9d368476f03 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -5566,9 +5566,9 @@ static void headerTimeTranslate(TransInfo *t, char *str) /* apply snapping + frame->seconds conversions */ if (autosnap == SACTSNAP_STEP) { if (doTime) - val= floor((double)val/secf + 0.5f); + val= floorf((double)val/secf + 0.5f); else - val= floor(val + 0.5f); + val= floorf(val + 0.5f); } else { if (doTime) |