Skip to content

Commit

Permalink
Animation.h:
Browse files Browse the repository at this point in the history
* TransitionAnimationInOut and TransitionAnimationSingle now both have a function begun() kind of mirroring the done() functions.
  • Loading branch information
razterizer committed Dec 5, 2024
1 parent 30713fc commit 89ffaca
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Animation.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ struct TransitionAnimationInOut
return math::in_range<float>(t, 0.f, 1.f, Range::ClosedOpen);
}

bool begun(float time_s) const
{
return time_s - transition_start_time_s >= enter_rel_start_time_s;
}

bool done(float time_s) const
{
return time_s - transition_start_time_s >= exit_rel_end_time_s;
Expand Down Expand Up @@ -98,6 +103,11 @@ struct TransitionAnimationSingle
return math::in_range<float>(t, 0.f, 1.f, Range::ClosedOpen);
}

bool begun(float time_s) const
{
return time_s - transition_start_time_s >= enter_rel_start_time_s;
}

bool done(float time_s) const
{
return time_s - transition_start_time_s >= exit_rel_end_time_s;
Expand Down

0 comments on commit 89ffaca

Please sign in to comment.