This commit is contained in:
Seiji Emery 2015-07-02 17:27:00 -07:00
parent 7ba03418fc
commit 28543c0bf2
2 changed files with 5 additions and 6 deletions

View file

@ -17,17 +17,16 @@
#include "AngularConstraintTests.h"
QTEST_MAIN(AngularConstraintTests)
// Computes the error value between two quaternions (using glm::dot)
float getErrorDifference(const glm::quat & a, const glm::quat & b) {
float getErrorDifference(const glm::quat& a, const glm::quat& b) {
return fabsf(glm::dot(a, b) - 1.0f);
}
QTextStream & operator << (QTextStream & stream, const glm::quat & q) {
QTextStream& operator<<(QTextStream& stream, const glm::quat& q) {
return stream << "glm::quat { " << q.x << ", " << q.y << ", " << q.z << ", " << q.w << " }";
}
QTEST_MAIN(AngularConstraintTests)
void AngularConstraintTests::testHingeConstraint() {
float minAngle = -PI;
float maxAngle = 0.0f;

View file

@ -14,7 +14,7 @@
#include <QtTest/QtTest>
inline float getErrorDifference (float a, float b) {
inline float getErrorDifference(float a, float b) {
return fabsf(a - b);
}