ac_ball link

This commit is contained in:
Prakxo
2024-01-09 18:38:12 +01:00
parent f279c6c962
commit a0e63ba650
14 changed files with 967 additions and 156 deletions
+3
View File
@@ -21,6 +21,7 @@ extern "C" {
#define SHT_MINV (1.0f / SHT_MAX)
#define ABS(x) (((x) >= 0) ? (x) : -(x))
#define SQ(x) ((x)*(x))
#define CLAMP_MAX(x, min) ((min) < (x) ? (min) : (x))
/* radians -> short angle */
#define RAD2SHORT_ANGLE(rad) ((s16)(int)((rad) * (65536.0f / (2.0f * F_PI))))
@@ -33,6 +34,8 @@ extern "C" {
/* degrees -> short angle */
#define DEG2SHORT_ANGLE(deg) ((s16)((deg) * (65536.0f / 360.0f)))
#define DEG2SHORT_ANGLE2(deg) ((int)((deg) * (65536.0f / 360.0f)))
/* short angle -> degrees */
#define SHORT2DEG_ANGLE(s) ((((f32)(s)) / (65536.0f / 360.0f)))