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>2014-01-15 06:00:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-15 06:40:40 +0400
commitb8b412230b1e1ed43295d5c299477a2cba73355e (patch)
tree0b3d61142c7a0490293c975a636165057f20c58e /source/blender/editors/space_graph/graph_ops.c
parente5c7535bebc37e04489fac4e88beca8cc5677d7d (diff)
Code Cleanup: use iroundf
also increase precision of rctf print functions
Diffstat (limited to 'source/blender/editors/space_graph/graph_ops.c')
-rw-r--r--source/blender/editors/space_graph/graph_ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index 74114f8ca9d..4409a5b180e 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -37,6 +37,7 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
+#include "BLI_math_base.h"
#include "BKE_context.h"
#include "BKE_global.h"
@@ -123,7 +124,7 @@ static void graphview_cursor_setprops(bContext *C, wmOperator *op, const wmEvent
/* store the values in the operator properties */
/* frame is rounded to the nearest int, since frames are ints */
- RNA_int_set(op->ptr, "frame", (int)floor(viewx + 0.5f));
+ RNA_int_set(op->ptr, "frame", iroundf(viewx));
RNA_float_set(op->ptr, "value", viewy);
}