Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-27 18:59:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-27 18:59:55 +0400
commit617e6a83bc89ca36e18bd06d851a31c010e11db2 (patch)
treed1347daa3d9a7bf51a0168048247cfe1ce13a4ee /source/blender/editors/space_image/image_ops.c
parent8d7c3f8a7e6de7625b3631cd91242fbefa98cf3a (diff)
object/paint/misc-files: floats were being implicitly promoted to doubles, adjust to use floats.
- also UV angle stretching was using radians->deg which wasn't needed.
Diffstat (limited to 'source/blender/editors/space_image/image_ops.c')
-rw-r--r--source/blender/editors/space_image/image_ops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 3aa509ab998..56b5ed10c56 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -394,7 +394,7 @@ static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
switch(event->type) {
case MOUSEMOVE:
- factor= 1.0 + (vpd->x-event->x+vpd->y-event->y)/300.0f;
+ factor= 1.0f + (vpd->x-event->x+vpd->y-event->y)/300.0f;
RNA_float_set(op->ptr, "factor", factor);
sima_zoom_set(sima, ar, vpd->zoom*factor);
ED_region_tag_redraw(CTX_wm_region(C));
@@ -522,10 +522,10 @@ static int view_selected_exec(bContext *C, wmOperator *UNUSED(op))
d[0]= max[0] - min[0];
d[1]= max[1] - min[1];
- size= 0.5*MAX2(d[0], d[1])*MAX2(width, height)/256.0f;
+ size= 0.5f*MAX2(d[0], d[1])*MAX2(width, height)/256.0f;
- if(size<=0.01) size= 0.01;
- sima_zoom_set(sima, ar, 0.7/size);
+ if(size<=0.01f) size= 0.01f;
+ sima_zoom_set(sima, ar, 0.7f/size);
ED_region_tag_redraw(CTX_wm_region(C));
@@ -1655,7 +1655,7 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
my= event->y - ar->winrct.ymin;
UI_view2d_region_to_view(&ar->v2d, mx, my, &fx, &fy);
- if(fx>=0.0 && fy>=0.0 && fx<1.0 && fy<1.0) {
+ if(fx>=0.0f && fy>=0.0f && fx<1.0f && fy<1.0f) {
float *fp;
char *cp;
int x= (int)(fx*ibuf->x), y= (int)(fy*ibuf->y);