From f083cacb259054ce996b70f8b9dc0d9eb0bdbfb8 Mon Sep 17 00:00:00 2001 From: omnisci3nce Date: Fri, 26 Jul 2024 16:37:53 +1000 Subject: wip egui --- src/maths/maths.c | 5 +++++ src/maths/maths.h | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 src/maths/maths.c (limited to 'src/maths') diff --git a/src/maths/maths.c b/src/maths/maths.c new file mode 100644 index 0000000..bfe0b5b --- /dev/null +++ b/src/maths/maths.c @@ -0,0 +1,5 @@ +#include "maths.h" + +Mat4 mat4_ident() { + return (Mat4){ .data = { 1.0, 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1.0 } }; +} \ No newline at end of file diff --git a/src/maths/maths.h b/src/maths/maths.h index 9b3813c..d235ca8 100644 --- a/src/maths/maths.h +++ b/src/maths/maths.h @@ -143,9 +143,7 @@ c_static_inline Quat quat_slerp(Quat a, Quat b, f32 percentage) { // --- Matrix Implementations -c_static_inline Mat4 mat4_ident() { - return (Mat4){ .data = { 1.0, 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1.0 } }; -} +Mat4 mat4_ident(); c_static_inline Mat4 mat4_translation(Vec3 position) { Mat4 out_matrix = mat4_ident(); -- cgit v1.2.3-70-g09d2