Skip to content

Commit

Permalink
apu: add missed rampf cond
Browse files Browse the repository at this point in the history
  • Loading branch information
JerwuQu committed Apr 18, 2024
1 parent 6227e90 commit a91a47e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runtimes/native/src/apu.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ static int ramp (int value1, int value2, unsigned long long time1, unsigned long
return lerp(value1, value2, t);
}
static float rampf (float value1, float value2, unsigned long long time1, unsigned long long time2) {
if (time >= time2) return value2;
float t = (float)(time - time1) / (time2 - time1);
return lerpf(value1, value2, t);
}
Expand Down

0 comments on commit a91a47e

Please sign in to comment.