diff options
| author | a1xd <[email protected]> | 2021-04-08 12:38:08 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2021-04-08 12:38:08 -0400 |
| commit | e3fe51dde5afed99a393e3b1b1f611fde011d9f3 (patch) | |
| tree | 5012b62bbfa3740ed8aca56b2653d32d2b501448 /common | |
| parent | Fix return bug (diff) | |
| download | rawaccel-e3fe51dde5afed99a393e3b1b1f611fde011d9f3.tar.xz rawaccel-e3fe51dde5afed99a393e3b1b1f611fde011d9f3.zip | |
fix some things
Diffstat (limited to 'common')
| -rw-r--r-- | common/accel-natural.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/accel-natural.hpp b/common/accel-natural.hpp index 8d25351..9f76d1a 100644 --- a/common/accel-natural.hpp +++ b/common/accel-natural.hpp @@ -28,7 +28,7 @@ namespace rawaccel { double offset_x = offset - x; double decay = exp(accel * offset_x); - return limit * (1 - (decay * offset_x + offset) / x) + 1; + return limit * (1 - (offset - decay * offset_x) / x) + 1; } using natural_base::natural_base; @@ -43,7 +43,7 @@ namespace rawaccel { double offset_x = offset - x; double decay = exp(accel * offset_x); - double output = limit * (offset_x + decay / accel) + constant; + double output = limit * (decay / accel - offset_x) + constant; return output / x + 1; } |