mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 20:34:32 +02:00
add QCOMPARE_QUATS macro for easier tests
This commit is contained in:
parent
f4e77b8200
commit
f64ab8e6b0
1 changed files with 4 additions and 0 deletions
|
@ -59,4 +59,8 @@ inline QTextStream& operator<< (QTextStream& stream, const glm::mat4& matrix) {
|
|||
stream << "]\n\t"; // hacky as hell, but this should work...
|
||||
return stream;
|
||||
}
|
||||
|
||||
#define QCOMPARE_QUATS(rotationA, rotationB, angle) \
|
||||
QVERIFY(fabsf(1.0f - fabsf(glm::dot(rotationA, rotationB))) < 2.0f * sinf(angle))
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue