diff options
Diffstat (limited to 'common/accel-natural.hpp')
| -rw-r--r-- | common/accel-natural.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/accel-natural.hpp b/common/accel-natural.hpp index 28e17c2..8d25351 100644 --- a/common/accel-natural.hpp +++ b/common/accel-natural.hpp @@ -26,8 +26,8 @@ namespace rawaccel { { if (x <= offset) return 1; - double offset_x = x - offset; - double decay = exp(-accel * offset_x); + double offset_x = offset - x; + double decay = exp(accel * offset_x); return limit * (1 - (decay * offset_x + offset) / x) + 1; } @@ -41,8 +41,8 @@ namespace rawaccel { { if (x <= offset) return 1; - double offset_x = x - offset; - double decay = exp(-accel * offset_x); + double offset_x = offset - x; + double decay = exp(accel * offset_x); double output = limit * (offset_x + decay / accel) + constant; return output / x + 1; } |