summaryrefslogtreecommitdiff
path: root/common/accel-motivity.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/accel-motivity.hpp')
-rw-r--r--common/accel-motivity.hpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/common/accel-motivity.hpp b/common/accel-motivity.hpp
index 246cf37..abeedf1 100644
--- a/common/accel-motivity.hpp
+++ b/common/accel-motivity.hpp
@@ -2,7 +2,7 @@
#include <math.h>
-#include "accel-base.hpp"
+#include "rawaccel-settings.h"
#define RA_LOOKUP
@@ -16,14 +16,14 @@ namespace rawaccel {
};
/// <summary> Struct to hold sigmoid (s-shaped) gain implementation. </summary>
- struct motivity_impl {
+ struct motivity {
double rate;
double limit;
double midpoint;
double subtractive_constant;
- motivity_impl(const accel_args& args) :
- rate(pow(10,args.accel)), limit(2*log10(args.limit)), midpoint(log10(args.midpoint))
+ motivity(const accel_args& args) :
+ rate(pow(10,args.accel_motivity)), limit(2*log10(args.limit)), midpoint(log10(args.midpoint))
{
subtractive_constant = limit / 2;
}
@@ -34,8 +34,6 @@ namespace rawaccel {
}
- inline double legacy_offset(double speed) const { return operator()(speed); }
-
inline double apply(si_pair* lookup, double speed) const
{
si_pair pair = lookup[map(speed)];
@@ -96,6 +94,4 @@ namespace rawaccel {
}
};
- using accel_motivity = nonadditive_accel<motivity_impl>;
-
}