mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-10 15:59:53 +00:00
fixed derivative
This commit is contained in:
parent
e73a9bb924
commit
821745dfa7
@ -292,7 +292,7 @@ void handle_animation(ld t) {
|
||||
for(int a=0; a<n-ss; a++) {
|
||||
// combining [a..a+(ss-1)] and [a+1..a+ss]
|
||||
if(times[a+ss] == times[a])
|
||||
values[a] = (values[a+ss] - values[a]) * (t-times[a]);
|
||||
values[a] = values[a] + (values[a+ss] - values[a]) * (t-times[a]);
|
||||
else
|
||||
values[a] = (values[a] * (times[a+ss] - t) + values[a+1] * (t - times[a])) / (times[a+ss] - times[a]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user