diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-27 21:22:04 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-27 21:22:04 +0400 |
commit | a73c3fe5c992777718431d5e5bb5f8a2c3b7a1bc (patch) | |
tree | 51ca1d7a06715f0dde24196157c915b12da334c0 /source/blender/editors/space_image | |
parent | 9c8f1e2ef487483bc374feaed9ff709e07638623 (diff) |
subsurf, derived mesh and other misc files: floats were being implicitly promoted to doubles, adjust to use floats.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 3e028607172..4f2e68bb216 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -205,8 +205,8 @@ static void draw_image_grid(ARegion *ar, float zoomx, float zoomy) } /* the fine resolution level */ - blendfac= 0.25*gridsize - floor(0.25f*gridsize); - CLAMP(blendfac, 0.0, 1.0); + blendfac= 0.25f*gridsize - floorf(0.25f*gridsize); + CLAMP(blendfac, 0.0f, 1.0f); UI_ThemeColorShade(TH_BACK, (int)(20.0f*(1.0f-blendfac))); fac= 0.0f; diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 56b5ed10c56..c560b68c01b 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -372,7 +372,7 @@ static int view_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event) ARegion *ar= CTX_wm_region(C); float factor; - factor= 1.0 + (event->x-event->prevx+event->y-event->prevy)/300.0f; + factor= 1.0f + (event->x-event->prevx+event->y-event->prevy)/300.0f; RNA_float_set(op->ptr, "factor", factor); sima_zoom_set(sima, ar, sima->zoom*factor); ED_region_tag_redraw(CTX_wm_region(C)); diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 1d643ba1a89..451e0e6e89b 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -204,7 +204,7 @@ void ED_image_aspect(Image *ima, float *aspx, float *aspy) *aspx= *aspy= 1.0; if((ima == NULL) || (ima->type == IMA_TYPE_R_RESULT) || (ima->type == IMA_TYPE_COMPOSITE) || - (ima->aspx==0.0 || ima->aspy==0.0)) + (ima->aspx==0.0f || ima->aspy==0.0f)) return; /* x is always 1 */ |