@@ 1,13 1,13 @@
use math;
-export fn translate_make(v: *v3) m4 = {
+export fn translation_make(v: *v3) m4 = {
const mat = m4_new_ident();
- v3_copy_to(v, glm::m4_col(&mat, 3));
+ v3_copy_to(v, m4_col(&mat, 3): *v3);
return mat;
};
export fn translate(m: *m4, v: *v3) void = {
- const mat = translate_make(v);
+ const mat = translation_make(v);
m4_mul_to(&mat, m, m);
};
@@ 23,9 23,9 @@ export fn rotation_make(angle: f32, axis: *v3) m4 = {
v3_scale_to(&axisn, 1.0 - c, &v);
v3_scale_to(&axisn, math::sinf64(angle), &vs);
- v3_scale_to(&axisn, v[0], m4_col(&r, 0));
- v3_scale_to(&axisn, v[1], m4_col(&r, 1));
- v3_scale_to(&axisn, v[2], m4_col(&r, 2));
+ v3_scale_to(&axisn, v[0], m4_col(&r, 0): *v3);
+ v3_scale_to(&axisn, v[1], m4_col(&r, 1): *v3);
+ v3_scale_to(&axisn, v[2], m4_col(&r, 2): *v3);
r[0][0] += c;
r[1][0] -= vs[2];