summaryrefslogtreecommitdiff
path: root/common/accel_linear.cpp
blob: 307e33eed0e3622f4549b712216e768c1303c6ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#define _USE_MATH_DEFINES
#include <math.h>

#include "accel_types.hpp"

namespace rawaccel {
	inline accel_linear::accel_linear(accel_args args)
		: accel_implentation(args) {}

	inline double accel_linear::accelerate(double speed) {
		//f(x) = mx
		return curve_constant_one * speed;
	}

	inline void accel_linear::verify(accel_args args) {
		accel_implentation::verify(args);
		if (args.lim_exp <= 1) error("limit must be greater than 1");
	}
}