Add levelling
This commit is contained in:
5
maths.h
5
maths.h
@@ -3,6 +3,9 @@
|
||||
|
||||
#define PI 3.14159265358979323846264
|
||||
|
||||
#define MAT2_ID ((mat2_t) { { 1, 0 }, { 0, 1 } })
|
||||
#define MAT3_ID ((mat3_t) { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 } })
|
||||
|
||||
typedef struct {
|
||||
float x, y;
|
||||
} vec2_t;
|
||||
@@ -27,6 +30,8 @@ vec3_t vec2_extend(vec2_t v);
|
||||
vec2_t vec2_norm(vec2_t v);
|
||||
float vec2_dot(vec2_t v1, vec2_t v2);
|
||||
|
||||
vec2_t vec3_reduce(vec3_t v);
|
||||
|
||||
mat2_t mat2_rotation(float theta);
|
||||
vec2_t mat2_mul_vec2(mat2_t m, vec2_t v);
|
||||
mat2_t mat2_mul_mat2(mat2_t m1, mat2_t m2);
|
||||
|
||||
Reference in New Issue
Block a user