Changeset 1107 for trunk/test/unit/quat.cpp
 Timestamp:
 Dec 10, 2011, 3:02:08 PM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/unit/quat.cpp
r1049 r1107 118 118 quat b = re(a); 119 119 120 LOLUNIT_ASSERT_EQUAL(a * b, b * a); 120 quat m1 = a * b; 121 quat m2 = b * a; 122 LOLUNIT_ASSERT_DOUBLES_EQUAL(m1.x, m2.x, 1e8); 123 LOLUNIT_ASSERT_DOUBLES_EQUAL(m1.y, m2.y, 1e8); 124 LOLUNIT_ASSERT_DOUBLES_EQUAL(m1.z, m2.z, 1e8); 125 LOLUNIT_ASSERT_DOUBLES_EQUAL(m1.w, m2.w, 1e8); 121 126 122 quat c = 1.0f; 123 124 LOLUNIT_ASSERT_EQUAL(a * b, c); 127 LOLUNIT_ASSERT_DOUBLES_EQUAL(m1.x, 0.0, 1e8); 128 LOLUNIT_ASSERT_DOUBLES_EQUAL(m1.y, 0.0, 1e8); 129 LOLUNIT_ASSERT_DOUBLES_EQUAL(m1.z, 0.0, 1e8); 130 LOLUNIT_ASSERT_DOUBLES_EQUAL(m1.w, 1.0, 1e8); 125 131 } 126 132 };
Note: See TracChangeset
for help on using the changeset viewer.