Skip to content

Commit

Permalink
Fix NaN value in Tween
Browse files Browse the repository at this point in the history
  • Loading branch information
jgranick committed Mar 1, 2024
1 parent d21f710 commit 0896e4c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/starling/animation/Tween.hx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ import starling.utils.Color;
var ratio:Float = __currentTime / __totalTime;
var reversed:Bool = __reverse && (__currentCycle % 2 == 1);
var numProperties:Int = __startValues.length;

__progress = reversed ? __transitionFunc(1.0 - ratio) : __transitionFunc(ratio);
if (__progress != __progress) __progress = 0; // isNaN check

for (i in 0...numProperties)
{
Expand Down

0 comments on commit 0896e4c

Please sign in to comment.