Skip to content

Commit

Permalink
fix typo in duration::reverse()
Browse files Browse the repository at this point in the history
  • Loading branch information
ammen99 committed Apr 4, 2024
1 parent c84e30b commit 34f3bf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/duration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ bool wf::animation::duration_t::running()
void wf::animation::duration_t::reverse()
{
auto total_duration = this->priv->get_duration();
auto elapsed = std::max(this->priv->get_elapsed(), (int64_t)total_duration);
auto elapsed = std::min(this->priv->get_elapsed(), (int64_t)total_duration);
auto remaining = std::chrono::milliseconds(total_duration - elapsed);
this->priv->start_point = std::chrono::system_clock::now() - remaining;
this->priv->reverse = !this->priv->reverse;
Expand Down

0 comments on commit 34f3bf9

Please sign in to comment.