From 43b49130516db974c125d89919fe8ddc25cf4405 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 27 Sep 2017 11:13:03 +1000 Subject: Math Lib: Add non-clamped round_* functions Replace iroundf with round_fl_to_int, add other types --- source/blender/editors/space_graph/graph_edit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_graph/graph_edit.c') diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index f38d36853d7..861a38da2c7 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -195,8 +195,8 @@ static int graphkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op)) /* set the range directly */ get_graph_keyframe_extents(&ac, &min, &max, NULL, NULL, false, false); scene->r.flag |= SCER_PRV_RANGE; - scene->r.psfra = iroundf(min); - scene->r.pefra = iroundf(max); + scene->r.psfra = round_fl_to_int(min); + scene->r.pefra = round_fl_to_int(max); /* set notifier that things have changed */ // XXX err... there's nothing for frame ranges yet, but this should do fine too @@ -2036,7 +2036,7 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op)) } else { /* Animation Mode - Affects current frame (int) */ - CFRA = iroundf(ked.f1 / ked.i1); + CFRA = round_fl_to_int(ked.f1 / ked.i1); SUBFRA = 0.f; sipo->cursorVal = ked.f2 / (float)ked.i1; } -- cgit v1.2.3