From 3408d6262d84742a22b4f3ea8cb600b09a62dc0f Mon Sep 17 00:00:00 2001 From: Martijn Braam Date: Sun, 13 Jun 2021 21:30:53 +0200 Subject: [PATCH] Add debug function to print matrices --- src/matrix.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/matrix.c b/src/matrix.c index b828816..7da7e78 100644 --- a/src/matrix.c +++ b/src/matrix.c @@ -1,3 +1,10 @@ +void print_matrix(float m[9]) +{ + printf(" [%.2f %.2f %.2f] \n", m[0], m[1], m[2]); + printf(" [%.2f %.2f %.2f] \n", m[3], m[4], m[5]); + printf(" [%.2f %.2f %.2f] \n\n", m[6], m[7], m[8]); +} + void multiply_matrices(float a[9], float b[9], float out[9]) {