Skip to content
Snippets Groups Projects
Commit 5477b234 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

fixed sp warnings

parent bb3f5da0
Branches
Tags
No related merge requests found
......@@ -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);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment