From e8417a29fb2153ea035a757f36bfa300cf8b480d Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Thu, 30 Jul 2020 17:07:35 -0400 Subject: add tweaks for st-refactor --- common/accel-linear.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 common/accel-linear.hpp (limited to 'common/accel-linear.hpp') diff --git a/common/accel-linear.hpp b/common/accel-linear.hpp new file mode 100644 index 0000000..28150a8 --- /dev/null +++ b/common/accel-linear.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include "accel-base.hpp" + +namespace rawaccel { + + /// Struct to hold linear acceleration implementation. + struct accel_linear : accel_base { + + accel_linear(accel_args args) : accel_base(args) {} + + inline double accelerate(double speed) const { + //f(x) = mx + return speed_coeff * speed; + } + }; + +} -- cgit v1.2.3 From b3ed8fd4e4fcad0b749126dee62588260d74b106 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Fri, 31 Jul 2020 01:37:41 -0400 Subject: add more tweaks for st-refactor --- common/accel-linear.hpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'common/accel-linear.hpp') diff --git a/common/accel-linear.hpp b/common/accel-linear.hpp index 28150a8..5cbb7c6 100644 --- a/common/accel-linear.hpp +++ b/common/accel-linear.hpp @@ -5,14 +5,10 @@ namespace rawaccel { /// Struct to hold linear acceleration implementation. - struct accel_linear : accel_base { + struct accel_linear : accel_base { - accel_linear(accel_args args) : accel_base(args) {} + using accel_base::accel_base; - inline double accelerate(double speed) const { - //f(x) = mx - return speed_coeff * speed; - } }; } -- cgit v1.2.3