From b3452f274e7433b7d497fe5f8df28996988185ba Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Wed, 7 Feb 2018 16:49:22 -0800 Subject: [PATCH] use glm::nan() for platform-agnostic code --- tests/shared/src/GeometryUtilTests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/shared/src/GeometryUtilTests.cpp b/tests/shared/src/GeometryUtilTests.cpp index ccb3dc8a0e..eb9be4987f 100644 --- a/tests/shared/src/GeometryUtilTests.cpp +++ b/tests/shared/src/GeometryUtilTests.cpp @@ -31,20 +31,20 @@ static void testSphereVsCone(const glm::vec3 coneNormal, const glm::vec3 coneBiN glm::vec3 coneCenter = glm::vec3(0.0f, 0.0f, 0.0f); glm::vec3 sphereCenter = coneCenter + coneEdge * sphereDistance; float result = coneSphereAngle(coneCenter, u, sphereCenter, sphereRadius); - QCOMPARE(isnan(result), false); + QCOMPARE(glm::isnan(result), false); QCOMPARE(result < coneAngle, true); // push sphere outward from edge so it is tangent to the cone. glm::vec3 sphereOffset = glm::angleAxis(PI / 2.0f, w) * coneEdge; sphereCenter += sphereOffset * sphereRadius; result = coneSphereAngle(coneCenter, u, sphereCenter, sphereRadius); - QCOMPARE(isnan(result), false); + QCOMPARE(glm::isnan(result), false); QCOMPARE_WITH_ABS_ERROR(result, coneAngle, 0.001f); // push sphere outward from edge a bit further, so it is outside of the cone. sphereCenter += 0.1f * sphereOffset; result = coneSphereAngle(coneCenter, u, sphereCenter, sphereRadius); - QCOMPARE(isnan(result), false); + QCOMPARE(glm::isnan(result), false); QCOMPARE(result > coneAngle, true); }