Add DEG2RAD macro

This commit is contained in:
8dcc 2023-07-23 15:49:34 +02:00
parent 1affa52bc8
commit ee2b9803e4
1 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,7 @@
#define UTIL_H_ #define UTIL_H_
#include <stdint.h> #include <stdint.h>
#include <math.h>
#include "sdk.h" #include "sdk.h"
#include "globals.h" #include "globals.h"
@ -13,6 +14,8 @@ typedef struct {
uint8_t r, g, b; uint8_t r, g, b;
} rgb_t; } rgb_t;
#define DEG2RAD(n) ((n)*M_PI / 180.0)
#define gl_drawline_points(p0, p1, w, col) \ #define gl_drawline_points(p0, p1, w, col) \
gl_drawline(p0[0], p0[1], p1[0], p1[1], w, col); gl_drawline(p0[0], p0[1], p1[0], p1[1], w, col);