Use quaternion multiplaction for quaternion derivative.

This commit is contained in:
James Goppert
2016-08-16 01:03:23 -04:00
parent c563c41cd4
commit e6a6b4680c
3 changed files with 8 additions and 15 deletions
+5 -1
View File
@@ -157,7 +157,11 @@ int main()
TEST(isEqual(q_from_m, m4));
// quaternion derivate
Vector<float, 4> q_dot = q.derivative(Vector3f(1, 2, 3));
Quatf q1(0, 1, 0, 0);
Vector<float, 4> q1_dot = q1.derivative(Vector3f(1, 2, 3));
float data_q_dot_check[] = {-0.5f, 0.0f, -1.5f, 1.0f};
Vector<float, 4> q1_dot_check(data_q_dot_check);
TEST(isEqual(q1_dot, q1_dot_check));
// quaternion product
Quatf q_prod_check(