summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/accel-natural.hpp4
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;
}