From 5477b234ef889766c293c0193a12c1aeb52d076a Mon Sep 17 00:00:00 2001
From: Sebastian Eibl <sebastian.eibl@fau.de>
Date: Fri, 24 Aug 2018 10:40:14 +0200
Subject: [PATCH] fixed sp warnings

---
 tests/mesh/MeshPeRaytracing.cpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/mesh/MeshPeRaytracing.cpp b/tests/mesh/MeshPeRaytracing.cpp
index 0cde05aa0..4f78824f2 100644
--- a/tests/mesh/MeshPeRaytracing.cpp
+++ b/tests/mesh/MeshPeRaytracing.cpp
@@ -72,9 +72,9 @@ int CpRayIntersectionTest(const int resolution = 10)
       for (int y = 0; y < resolution; ++y)
       {
          const real_t rand2 = real_c(y) * dx;
-         real_t theta = 2 * M_PI * rand1;
-         real_t phi = acos(1 - 2 * rand2);
-         Vec3 dir(sin(phi) * cos(theta), sin(phi) * sin(theta), cos(phi));
+         real_t theta = real_t(2) * M_PI * rand1;
+         real_t phi = acos(real_t(1) - real_t(2) * rand2);
+         Vec3 dir(std::sin(phi) * std::cos(theta), std::sin(phi) * std::sin(theta), std::cos(phi));
 
          Ray ray( center + dir*real_t(5), -dir);
          real_t bx_t, cp_t;
@@ -94,11 +94,11 @@ int CpRayIntersectionTest(const int resolution = 10)
       for (int y = 0; y < resolution; ++y)
       {
          const real_t rand2 = real_c(y) * dx;
-         real_t theta = 2 * M_PI * rand1;
-         real_t phi = acos(1 - 2 * rand2);
-         Vec3 dir(sin(phi) * cos(theta), sin(phi) * sin(theta), cos(phi));
+         real_t theta = real_t(2) * M_PI * rand1;
+         real_t phi = acos(real_t(1) - real_t(2) * rand2);
+         Vec3 dir(std::sin(phi) * std::cos(theta), std::sin(phi) * std::sin(theta), std::cos(phi));
 
-         Ray ray( Vec3(5,5,5), -dir);
+         Ray ray( Vec3(real_t(5),real_t(5),real_t(5)), -dir);
          real_t bx_t, cp_t;
          Vec3   bx_n, cp_n;
          const bool bx_intersects = intersects(&bx, ray, bx_t, bx_n);
-- 
GitLab