summaryrefslogtreecommitdiff
path: root/common/accel_linear.cpp
blob: d12e79825c0304697b1b1654a0520b9668c5244d (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 {
	accel_linear::accel_linear(accel_args args)
		: accel_implentation(args) {}

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

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