diff options
| author | Jacob Palecki <[email protected]> | 2021-04-06 23:34:13 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2021-04-06 23:34:13 -0700 |
| commit | c06d88e602983b650d4a61b8fb248be3e15d822b (patch) | |
| tree | bc65eeccf10fab20a7f624fe80a4fded11168b42 | |
| parent | Fix natural legacy algorithm, rename accelNatural to decayRate (diff) | |
| download | rawaccel-c06d88e602983b650d4a61b8fb248be3e15d822b.tar.xz rawaccel-c06d88e602983b650d4a61b8fb248be3e15d822b.zip | |
natural legacy algorithm was correct, leave as it was
| -rw-r--r-- | common/accel-natural.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/accel-natural.hpp b/common/accel-natural.hpp index 1f18e0d..28e17c2 100644 --- a/common/accel-natural.hpp +++ b/common/accel-natural.hpp @@ -28,7 +28,7 @@ namespace rawaccel { double offset_x = x - offset; double decay = exp(-accel * offset_x); - return limit * (1 - (decay)) + 1; + return limit * (1 - (decay * offset_x + offset) / x) + 1; } using natural_base::natural_base; |