MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / VerifyIdentityMatrix

Function VerifyIdentityMatrix

tests/test_linear_algebra.cpp:63–73  ·  view source on GitHub ↗

Helper function to verify identity matrix Takes a non-const reference because mat4::operator() is not const

Source from the content-addressed store, hash-verified

61// Helper function to verify identity matrix
62// Takes a non-const reference because mat4::operator() is not const
63void VerifyIdentityMatrix(mat4 &m) {
64 for (int i = 0; i < MATRIX_SIZE; ++i) {
65 for (int j = 0; j < MATRIX_SIZE; ++j) {
66 if (i == j) {
67 EXPECT_NEAR(m(i, j), IDENTITY_VALUE, EPSILON);
68 } else {
69 EXPECT_NEAR(m(i, j), ZERO_VALUE, EPSILON);
70 }
71 }
72 }
73}
74} // namespace
75
76// vec4 Tests

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected