Skip to content

Instantly share code, notes, and snippets.

@recp
Created December 24, 2018 10:15
Show Gist options
  • Save recp/3cc7c5b04fcb3d626e27bffa0cb3b934 to your computer and use it in GitHub Desktop.
Save recp/3cc7c5b04fcb3d626e27bffa0cb3b934 to your computer and use it in GitHub Desktop.
mat3-test.c
#include "test_common.h"
void
test_mat3(void **state) {
mat3 m1 = {{1.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 1.0f}};
int i, j, k;
for (i = 0; i < 3; i++) {
for (j = 0; j < 3; j++) {
if(!glm_eq(m1[i][j], 1.0f))
printf("**** %f\n", m1[i][j]);
if (i == j)
assert_true(glm_eq(m1[i][j], 1.0f));
else
assert_true(glm_eq(m1[i][j], 0.0f));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment