Clean up and document code.
This commit is contained in:
@@ -7,6 +7,12 @@ using namespace std;
|
||||
using namespace wr;
|
||||
|
||||
|
||||
TEST(Quaternion, SelfTest)
|
||||
{
|
||||
geom::Quaternion_SelfTest();
|
||||
}
|
||||
|
||||
|
||||
TEST(Quaterniond, Addition)
|
||||
{
|
||||
geom::Quaterniond p(geom::Vector4d {1.0, -2.0, 1.0, 3.0});
|
||||
@@ -250,6 +256,16 @@ TEST(QuaternionMiscellaneous, OutputStream)
|
||||
}
|
||||
|
||||
|
||||
TEST(QuaternionMiscellanous, InitializerConstructor)
|
||||
{
|
||||
geom::Quaternionf p {1.0, 1.0, 1.0, 1.0};
|
||||
geom::Quaternionf q(geom::Vector4f {1.0, 1.0, 1.0, 1.0});
|
||||
|
||||
EXPECT_EQ(p, q);
|
||||
EXPECT_FLOAT_EQ(p.norm(), 2.0);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user