diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-15 06:00:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-15 06:40:40 +0400 |
commit | b8b412230b1e1ed43295d5c299477a2cba73355e (patch) | |
tree | 0b3d61142c7a0490293c975a636165057f20c58e /source/blender/editors/space_action | |
parent | e5c7535bebc37e04489fac4e88beca8cc5677d7d (diff) |
Code Cleanup: use iroundf
also increase precision of rctf print functions
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r-- | source/blender/editors/space_action/action_edit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 7142a6339a3..e2ca45bbdc9 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -337,8 +337,8 @@ static int actkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op)) /* set the range directly */ get_keyframe_extents(&ac, &min, &max, FALSE); scene->r.flag |= SCER_PRV_RANGE; - scene->r.psfra = (int)floor(min + 0.5f); - scene->r.pefra = (int)floor(max + 0.5f); + scene->r.psfra = iroundf(min); + scene->r.pefra = iroundf(max); /* set notifier that things have changed */ // XXX err... there's nothing for frame ranges yet, but this should do fine too @@ -1372,7 +1372,7 @@ static int actkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op)) /* set the new current frame value, based on the average time */ if (ked.i1) { Scene *scene = ac.scene; - CFRA = (int)floor((ked.f1 / ked.i1) + 0.5f); + CFRA = iroundf(ked.f1 / ked.i1); SUBFRA = 0.f; } |