From 3a06085eddd168cd84b6468dae7b3fbc04624a6c Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Thu, 10 Aug 2017 19:57:35 +0200 Subject: [PATCH] Fixed -Weverything warnings --- glm/gtc/random.inl | 5 +++-- test/gtc/gtc_random.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/glm/gtc/random.inl b/glm/gtc/random.inl index 3a16eb39..b6385189 100644 --- a/glm/gtc/random.inl +++ b/glm/gtc/random.inl @@ -3,6 +3,7 @@ #include "../geometric.hpp" #include "../exponential.hpp" +#include "../trigonometric.hpp" #include #include #include @@ -331,8 +332,8 @@ namespace detail template GLM_FUNC_QUALIFIER vec<2, T, defaultp> circularRand(T Radius) { - T a = linearRand(T(0), T(6.283185307179586476925286766559f)); - return vec<2, T, defaultp>(cos(a), sin(a)) * Radius; + T a = linearRand(T(0), static_cast(6.283185307179586476925286766559)); + return vec<2, T, defaultp>(glm::cos(a), glm::sin(a)) * Radius; } template diff --git a/test/gtc/gtc_random.cpp b/test/gtc/gtc_random.cpp index ac339d61..30211439 100644 --- a/test/gtc/gtc_random.cpp +++ b/test/gtc/gtc_random.cpp @@ -283,7 +283,7 @@ int test_diskRand() { float ResultFloat = 0.0f; - double ResultDouble = 0.0f; + double ResultDouble = 0.0; for(std::size_t i = 0; i < TestSamples; ++i) { @@ -305,7 +305,7 @@ int test_ballRand() { float ResultFloat = 0.0f; - double ResultDouble = 0.0f; + double ResultDouble = 0.0; for(std::size_t i = 0; i < TestSamples; ++i) {