1
0
Fork 0
mirror of https://github.com/ctruLua/ctruLua.git synced 2025-10-28 00:39:30 +00:00

Updated Lua and citro3D, Added a type check in ctr.thread.pool

This commit is contained in:
Firew0lf 2016-09-24 18:42:40 +02:00
parent d3ea68f3d7
commit 2725dce383
81 changed files with 1467 additions and 801 deletions

View file

@ -737,6 +737,31 @@ check_matrix(generator_t &gen, distribution_t &dist)
assert(Mtx_MultiplyFVecH(&m, FVec3_New(v.x, v.y, v.z)) == glm::mat4x3(g)*v);
}
// check matrix transpose
{
C3D_Mtx m;
glm::mat4 check;
randomMatrix(m, gen, dist);
//Reducing rounding errors, and copying the values over to the check matrix.
for(size_t i = 0; i < 16; ++i)
{
m.m[i] = static_cast<int>(m.m[i]);
}
check = loadMatrix(m);
Mtx_Transpose(&m);
Mtx_Transpose(&m);
assert(m == glm::transpose(glm::transpose(check)));
//Comparing inverse(transpose(m)) == transpose(inverse(m))
Mtx_Transpose(&m);
Mtx_Inverse(&m);
assert(m == glm::transpose(glm::inverse(check)));
}
}
}