Unit test Quaternion::Quaternion(Matrix3x3).
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 4m39s
Build Docs With Doxygen / Explore-Gitea-Actions (push) Successful in 21s

This commit is contained in:
2025-03-03 03:37:05 -06:00
parent b4e3bf4a7d
commit 073b1518fe

View File

@@ -95,6 +95,20 @@ namespace QuaternionTests {
jtest::check(Math::EqualAbs(expected_result.w, from_axis.w, 1e-6f));
});
QuaternionUnit += Test("To&FromMatrix3x3", [] {
// TODO: Test multiple rotation values.
// https://www.andre-gaschler.com/rotationconverter/
Matrix3x3 matrix_rep = {
0.9902160, 0.0000000, 0.1395431,
0.1273699, 0.4084874, -0.9038334,
-0.0570016, 0.9127640, 0.4044908};
Quaternion quat_rep = {0.5425029, 0.0586955, 0.0380374, 0.8371371};
Quaternion from_mat = Quaternion(matrix_rep);
jtest::check(quat_rep.Equals(from_mat));
});
QuaternionUnit += Test("Mat4x4Conversion", [] { throw("Not Implemented"); });
QuaternionUnit += Test("MulOpQuat", [] { throw("Not Implemented"); });
QuaternionUnit += Test("DivOpQuat", [] { throw("Not Implemented"); });