Skip to content

Commit

Permalink
Add test for setting Quaternion to Identity (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilritz authored and Julian Kent committed Nov 8, 2019
1 parent 9f46483 commit 93d4294
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/attitude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ int main()
TEST(isEqual(q_non_canonical,q_canonical_ref));
TEST(isEqual(q_canonical,q_canonical_ref));

// quaternion setIdentity
Quatf q_nonIdentity(-0.7f, 0.4f, 0.5f, -0.3f);
Quatf q_identity(1.0f, 0.0f, 0.0f, 0.0f);
q_nonIdentity.setIdentity();
TEST(isEqual(q_nonIdentity, q_identity));

// non-unit quaternion invese
Quatf qI(1.0f, 0.0f, 0.0f, 0.0f);
Quatf q_nonunit(0.1f, 0.2f, 0.3f, 0.4f);
Expand Down

0 comments on commit 93d4294

Please sign in to comment.