File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -591,7 +591,8 @@ impl Animation {
591591 return ;
592592 }
593593
594- // Raw progress ratio of the animation: can be negative (before start) or >1.0 (after end).
594+ // Raw progress ratio of the animation: can be negative (before start) or
595+ // >1.0 (after end or during multiple iterations).
595596 let progress = match self . state {
596597 AnimationState :: Running | AnimationState :: Pending | AnimationState :: Finished => {
597598 ( now - self . started_at ) / self . duration
@@ -688,7 +689,8 @@ impl Animation {
688689 } ,
689690 } ;
690691
691- // Detect zero interval. Prevent division by zero from percentage_between_keyframes.
692+ // Prevent division by zero from percentage_between_keyframes.
693+ // This can happen for reverse direction at total_progress == 0.0.
692694 if Some ( prev_keyframe_index) == next_keyframe_index {
693695 add_declarations_to_map ( & prev_keyframe) ;
694696 return ;
You can’t perform that action at this time.
0 commit comments