summaryrefslogtreecommitdiff
path: root/common/accel-linear.hpp
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-03 19:36:44 -0700
committerJacob Palecki <[email protected]>2020-09-03 19:36:44 -0700
commit01f870a493378a62ab76dcbf5dc37c0390ca7afe (patch)
treeb3dac41f6c0fa67b6c62c6643145f01b464c1a46 /common/accel-linear.hpp
parentChange classic, natural, naturalgain to use gain offset (diff)
downloadrawaccel-01f870a493378a62ab76dcbf5dc37c0390ca7afe.tar.xz
rawaccel-01f870a493378a62ab76dcbf5dc37c0390ca7afe.zip
Refactor for nice gain offset
Diffstat (limited to 'common/accel-linear.hpp')
-rw-r--r--common/accel-linear.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/accel-linear.hpp b/common/accel-linear.hpp
index 95ba261..2bd57b8 100644
--- a/common/accel-linear.hpp
+++ b/common/accel-linear.hpp
@@ -21,6 +21,9 @@ namespace rawaccel {
return accel * base_speed - subtractive_const + divisive_const / base_speed;
}
+ inline double legacy_offset(double speed) const {
+ return accel * speed;
+ }
};
using accel_linear = additive_accel<linear_impl>;