miniFOC 1.0.3
This open-source project aims to accomplish a FOC(Field Oriented Control) scheme that is operatable with minimum costs in China.
fast_math.h
Go to the documentation of this file.
1/**************************************************************************/
10#ifndef MINIFOC_ALGORITHM_FAST_MATH_H_
11#define MINIFOC_ALGORITHM_FAST_MATH_H_
12
20#define fast_constrain(x, low, high) ((x)<(low)?(low):((x) >(high)?(high):(x)))
21
27#define fast_cos(x) fast_sin(1.5707963f - x);
28
29float fast_sin(float theta);
30
31#endif //MINIFOC_ALGORITHM_FAST_MATH_H_
float fast_sin(float theta)
fast calculation of sine
Definition: fast_math.c:72