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/animation/anim_markers.c')
-rw-r--r--source/blender/editors/animation/anim_markers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index e65ca3d20be..f95807b55ea 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -144,7 +144,7 @@ int ED_markers_post_apply_transform(ListBase *markers, Scene *scene, int mode, f
(side == 'L' && marker->frame < cfra) ||
(side == 'R' && marker->frame >= cfra))
{
- marker->frame += (int)floorf(value + 0.5f);
+ marker->frame += iroundf(value);
changed_tot++;
}
break;
@@ -152,7 +152,7 @@ int ED_markers_post_apply_transform(ListBase *markers, Scene *scene, int mode, f
case TFM_TIME_SCALE:
{
/* rescale the distance between the marker and the current frame */
- marker->frame = cfra + (int)floorf(((float)(marker->frame - cfra) * value) + 0.5f);
+ marker->frame = cfra + iroundf((float)(marker->frame - cfra) * value);
changed_tot++;
break;
}
@@ -190,7 +190,7 @@ TimeMarker *ED_markers_find_nearest_marker(ListBase *markers, float x)
int ED_markers_find_nearest_marker_time(ListBase *markers, float x)
{
TimeMarker *nearest = ED_markers_find_nearest_marker(markers, x);
- return (nearest) ? (nearest->frame) : (int)floor(x + 0.5f);
+ return (nearest) ? (nearest->frame) : iroundf(x);
}