diff options
| author | Jacob Palecki <[email protected]> | 2020-09-03 19:36:44 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-03 19:36:44 -0700 |
| commit | 01f870a493378a62ab76dcbf5dc37c0390ca7afe (patch) | |
| tree | b3dac41f6c0fa67b6c62c6643145f01b464c1a46 /common/accel-classic.hpp | |
| parent | Change classic, natural, naturalgain to use gain offset (diff) | |
| download | rawaccel-01f870a493378a62ab76dcbf5dc37c0390ca7afe.tar.xz rawaccel-01f870a493378a62ab76dcbf5dc37c0390ca7afe.zip | |
Refactor for nice gain offset
Diffstat (limited to 'common/accel-classic.hpp')
| -rw-r--r-- | common/accel-classic.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/accel-classic.hpp b/common/accel-classic.hpp index 3f409c3..1df888a 100644 --- a/common/accel-classic.hpp +++ b/common/accel-classic.hpp @@ -25,6 +25,10 @@ namespace rawaccel { double base_speed = speed + offset; return multiplicative_const * pow(speed, power_inc) / base_speed; } + + inline double legacy_offset(double speed) const { + return pow(accel * speed, power); + } }; using accel_classic = additive_accel<classic_impl>; |