2022-12-04 23:15:18 +08:00
|
|
|
|
#ifndef GENERAL_DEF_H
|
|
|
|
|
#define GENERAL_DEF_H
|
|
|
|
|
|
2022-12-09 18:25:35 +08:00
|
|
|
|
#ifndef PI
|
2022-12-04 23:15:18 +08:00
|
|
|
|
#define PI 3.1415926535f
|
2023-01-02 23:20:35 +08:00
|
|
|
|
#endif // !PI
|
2022-12-04 23:15:18 +08:00
|
|
|
|
#define PI2 (PI * 2.0f) // 2 pi
|
|
|
|
|
|
2023-01-02 23:20:35 +08:00
|
|
|
|
#define RAD_2_ANGLE 57.2957795f // 180/pi
|
|
|
|
|
#define ANGLE_2_RAD 0.01745329252f // pi/180
|
2022-12-04 23:15:18 +08:00
|
|
|
|
|
2023-01-02 23:20:35 +08:00
|
|
|
|
#define RPM_2_ANGLE_PER_SEC 6.0f // ×360°/60sec
|
2022-12-04 23:15:18 +08:00
|
|
|
|
|
|
|
|
|
#endif // !GENERAL_DEF_H
|