Implement simple line drawing
This commit is contained in:
15
maths.c
Normal file
15
maths.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "maths.h"
|
||||
|
||||
vec3_t vec2_extend(vec2_t v)
|
||||
{
|
||||
return (vec3_t) { v.x, v.y, 1 };
|
||||
}
|
||||
|
||||
vec3_t mat3_mul_vec3(mat3_t m, vec3_t v)
|
||||
{
|
||||
return (vec3_t) {
|
||||
.x = m.x.x * v.x + m.y.x * v.y + m.z.x * v.z,
|
||||
.y = m.x.y * v.x + m.y.y * v.y + m.z.y * v.z,
|
||||
.z = m.x.z * v.x + m.y.z * v.y + m.z.z * v.z,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user