From 8d7c3f8a7e6de7625b3631cd91242fbefa98cf3a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 27 Mar 2011 14:52:16 +0000 Subject: interface: floats were being implicitly promoted to doubles, adjust to use floats (in most cases) otherwise cast to double. --- source/blender/editors/interface/view2d.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/interface/view2d.c') diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 8c397d9c14f..32301dd6423 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -996,12 +996,12 @@ void UI_view2d_view_ortho(View2D *v2d) /* XXX ton: this flag set by outliner, for icons */ if(v2d->flag & V2D_PIXELOFS_X) { - curmasked.xmin= floor(curmasked.xmin) - 0.001f; - curmasked.xmax= floor(curmasked.xmax) - 0.001f; + curmasked.xmin= floorf(curmasked.xmin) - 0.001f; + curmasked.xmax= floorf(curmasked.xmax) - 0.001f; } if(v2d->flag & V2D_PIXELOFS_Y) { - curmasked.ymin= floor(curmasked.ymin) - 0.001f; - curmasked.ymax= floor(curmasked.ymax) - 0.001f; + curmasked.ymin= floorf(curmasked.ymin) - 0.001f; + curmasked.ymax= floorf(curmasked.ymax) - 0.001f; } /* set matrix on all appropriate axes */ @@ -1815,8 +1815,8 @@ void UI_view2d_listview_view_to_cell(View2D *v2d, short columnwidth, short rowhe float viewx, float viewy, int *column, int *row) { /* adjust view coordinates to be all positive ints, corrected for the start offset */ - const int x= (int)(floor(fabs(viewx) + 0.5f) - startx); - const int y= (int)(floor(fabs(viewy) + 0.5f) - starty); + const int x= (int)(floorf(fabsf(viewx) + 0.5f) - startx); + const int y= (int)(floorf(fabsf(viewy) + 0.5f) - starty); /* sizes must not be negative */ if ( (v2d == NULL) || ((columnwidth <= 0) && (rowheight <= 0)) ) { -- cgit v1.2.3