Skip to content

Commit 04865f4

Browse files
committed
normalize test
1 parent b5de81e commit 04865f4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ZEngine/tests/Maths/Quaternion_test.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ TEST(QuaternionTest, QuaternionToMat4)
443443
EXPECT_NEAR(arbMatrix(3, 3), 1.0f, EPSILON);
444444
}
445445

446-
TEST(TransformTest, QuaternionRotate)
446+
TEST(QuaternionTest, QuaternionRotate)
447447
{
448448
Quaternion<float> identity(0.0f, 0.0f, 0.0f, 1.0f);
449449
Vec3f vector(1.0f, 2.0f, 3.0f);
@@ -464,8 +464,9 @@ TEST(TransformTest, QuaternionRotate)
464464

465465
angle = radians(180.0f);
466466
Quaternion<float> rot180Y(0.0f, sin(angle * 0.5f), 0.0f, cos(angle * 0.5f));
467-
Vec3f zAxis(0.0f, 0.0f, 1.0f);
468-
Vec3f rotatedZ = rotate(rot180Y, zAxis);
467+
rot180Y = rot180Y.normalize();
468+
Vec3f zAxis(0.0f, 0.0f, 1.0f);
469+
Vec3f rotatedZ = rotate(rot180Y, zAxis);
469470

470471
EXPECT_NEAR(rotatedZ.x, 0.0f, EPSILON);
471472
EXPECT_NEAR(rotatedZ.y, 0.0f, EPSILON);

0 commit comments

Comments
 (0)