Browse Source

Fixed -Weverything warnings

Christophe Riccio 8 years ago
parent
commit
3a06085edd
2 changed files with 5 additions and 4 deletions
  1. 3 2
      glm/gtc/random.inl
  2. 2 2
      test/gtc/gtc_random.cpp

+ 3 - 2
glm/gtc/random.inl

@@ -3,6 +3,7 @@
 
 #include "../geometric.hpp"
 #include "../exponential.hpp"
+#include "../trigonometric.hpp"
 #include <cstdlib>
 #include <ctime>
 #include <cassert>
@@ -331,8 +332,8 @@ namespace detail
 	template<typename T>
 	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<T>(6.283185307179586476925286766559));
+		return vec<2, T, defaultp>(glm::cos(a), glm::sin(a)) * Radius;
 	}
 
 	template<typename T>

+ 2 - 2
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)
 		{