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:52:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-27 18:52:16 +0400
commit8d7c3f8a7e6de7625b3631cd91242fbefa98cf3a (patch)
treee839ba73dfdff4795060b63fa88c1fdecdf03b73 /source/blender/editors/interface/view2d.c
parent0b9f67061ce34e6147a013cc7025bb194c4e693e (diff)
interface: floats were being implicitly promoted to doubles, adjust to use floats (in most cases) otherwise cast to double.
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c12
1 files changed, 6 insertions, 6 deletions
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)) ) {