Add a vector translation multiplication test

This commit is contained in:
Eryn Wells 2014-08-16 16:57:08 -07:00
parent 22297da809
commit 09c5e29f63

View file

@ -295,6 +295,18 @@ TEST_F(Matrix4Test, IdentityVectorMultiplication)
}
TEST_F(Matrix4Test, TranslationVectorMultiplication)
{
Matrix4 tr = Matrix4::Translation(1, 2, 3);
Vector4 v1(3, 7, 9);
Vector4 p1 = tr * v1;
EXPECT_EQ(p1.X(), 4.0);
EXPECT_EQ(p1.Y(), 9.0);
EXPECT_EQ(p1.Z(), 12.0);
}
TEST_F(Matrix4Test, Transpose)
{
Matrix4 t1 = Transpose(m1);