Adapt ai_epsilon to code

This commit is contained in:
Kim Kulling
2022-02-16 20:07:27 +01:00
parent 067c5d9ec4
commit 76a7614c4b
13 changed files with 39 additions and 43 deletions

View File

@@ -573,7 +573,7 @@ TEST_F(utglTF2ImportExport, export_normalized_normals) {
scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/BoxBadNormals-glTF-Binary/BoxBadNormals_out.glb", aiProcess_ValidateDataStructure);
for ( auto i = 0u; i < scene->mMeshes[0]->mNumVertices; ++i ) {
const auto length = scene->mMeshes[0]->mNormals[i].Length();
EXPECT_TRUE(abs(length) < 1e-6 || abs(length - 1) < 1e-6);
EXPECT_TRUE(abs(length) < 1e-6 || abs(length - 1) < ai_epsilon);
}
}