Skip to content

Commit

Permalink
Merge pull request #2398 from Wang-Yue/patch-7
Browse files Browse the repository at this point in the history
remove unsequenced modification and access
  • Loading branch information
nesbox authored Dec 10, 2023
2 parents 5b43a49 + 94e6077 commit a3b50ec
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions src/studio/studio.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,11 +796,23 @@ static inline float bounceOut(float x)
{
const float n1 = 7.5625;
const float d1 = 2.75;

if (x < 1 / d1) return n1 * x * x;
else if (x < 2 / d1) return n1 * (x -= 1.5 / d1) * x + 0.75;
else if (x < 2.5 / d1) return n1 * (x -= 2.25 / d1) * x + 0.9375;
else return n1 * (x -= 2.625 / d1) * x + 0.984375;

if (x < 1 / d1) return n1 * x * x;
else if (x < 2 / d1)
{
x -= 1.5 / d1;
return n1 * x * x + 0.75;
}
else if (x < 2.5 / d1)
{
x -= 2.25 / d1;
return n1 * x * x + 0.9375;
}
else
{
x -= 2.625 / d1;
return n1 * x * x + 0.984375;
}
}

static inline float animEffect(AnimEffect effect, float x)
Expand Down

0 comments on commit a3b50ec

Please sign in to comment.