Skip to content

Commit

Permalink
use std::floor instead of std::ceil in calculating total count of frames
Browse files Browse the repository at this point in the history
  • Loading branch information
Samweli authored and nyalldawson committed May 2, 2020
1 parent 89fe634 commit ca80f45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgstemporalnavigationobject.cpp
Expand Up @@ -191,7 +191,7 @@ void QgsTemporalNavigationObject::skipToEnd()
long long QgsTemporalNavigationObject::totalFrameCount()
{
QgsInterval totalAnimationLength = mTemporalExtents.end() - mTemporalExtents.begin();
return std::ceil( totalAnimationLength.seconds() / mFrameDuration.seconds() ) + 1;
return std::floor( totalAnimationLength.seconds() / mFrameDuration.seconds() ) + 1;
}

void QgsTemporalNavigationObject::setAnimationState( AnimationState mode )
Expand Down

0 comments on commit ca80f45

Please sign in to comment.