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:
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index e4c328758c0..32301dd6423 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -25,6 +25,11 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/editors/interface/view2d.c
+ * \ingroup edinterface
+ */
+
+
#include <float.h>
#include <limits.h>
#include <math.h>
@@ -991,17 +996,17 @@ 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 */
wmOrtho2(curmasked.xmin-xofs, curmasked.xmax-xofs, curmasked.ymin-yofs, curmasked.ymax-yofs);
-
+
/* XXX is this necessary? */
glLoadIdentity();
}
@@ -1810,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)) ) {