blob: 928eda926715c70c5924fd9affa06288a121c6b6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#pragma once
#include <math.h>
#include "accel-base.hpp"
namespace rawaccel {
/// <summary> Struct to hold logarithmic acceleration implementation. </summary>
struct accel_logarithmic : accel_base {
using accel_base::accel_base;
inline double accelerate(double speed) const {
//f(x) = log(m*x+1)
return log(speed_coeff * speed + 1);
}
};
}
|