From 1d6a5fa19d102bf257a83038d005d89220809ff3 Mon Sep 17 00:00:00 2001 From: fvbj Date: Tue, 30 Jan 2024 21:58:39 +0100 Subject: [PATCH] Fix type of float values in the unit test --- test/unit/utglTF2ImportExport.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/utglTF2ImportExport.cpp b/test/unit/utglTF2ImportExport.cpp index 9bf0dbec2..478f75666 100644 --- a/test/unit/utglTF2ImportExport.cpp +++ b/test/unit/utglTF2ImportExport.cpp @@ -997,18 +997,18 @@ TEST_F(utglTF2ImportExport, testSetIdentityMatrixEpsilon) { properties.GetPropertyFloat("CHECK_IDENTITY_MATRIX_EPSILON", AI_CONFIG_CHECK_IDENTITY_MATRIX_EPSILON_DEFAULT)); aiMatrix4x4 m; - m = aiMatrix4x4(1.02, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + m = aiMatrix4x4(1.02f, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); EXPECT_FALSE(m.IsIdentity()); - m = aiMatrix4x4(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + m = aiMatrix4x4(1.001f, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); EXPECT_TRUE(m.IsIdentity()); bool b = properties.SetPropertyFloat("CHECK_IDENTITY_MATRIX_EPSILON", 0.0001f); EXPECT_TRUE(!b); ai_real epsilon = properties.GetPropertyFloat("CHECK_IDENTITY_MATRIX_EPSILON", 0.01f); EXPECT_EQ(0.0001f, epsilon); - m = aiMatrix4x4(1.0002, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + m = aiMatrix4x4(1.0002f, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); EXPECT_FALSE(m.IsIdentity(epsilon)); - m = aiMatrix4x4(1.00009, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + m = aiMatrix4x4(1.00009f, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); EXPECT_TRUE(m.IsIdentity(epsilon)); }