From a201957cf9f948b7b4b0b0e010a4440fc1790914 Mon Sep 17 00:00:00 2001 From: Zuzu-Typ Date: Tue, 28 May 2019 16:10:58 +0200 Subject: [PATCH 1/2] Silence C4244 warning Silenced a C4244 warning in gaussRand. --- glm/gtc/random.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/gtc/random.inl b/glm/gtc/random.inl index de10a409..0cb111a2 100644 --- a/glm/gtc/random.inl +++ b/glm/gtc/random.inl @@ -228,7 +228,7 @@ namespace detail w = x1 * x1 + x2 * x2; } while(w > genType(1)); - return x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean; + return (genType)(x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean); } template From bc70a03adca412f72b65d7310e58aca4ee1ce5e1 Mon Sep 17 00:00:00 2001 From: Zuzu-Typ Date: Wed, 29 May 2019 12:20:11 +0200 Subject: [PATCH 2/2] Use static_cast instead of C-style --- glm/gtc/random.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/gtc/random.inl b/glm/gtc/random.inl index 0cb111a2..70485098 100644 --- a/glm/gtc/random.inl +++ b/glm/gtc/random.inl @@ -228,7 +228,7 @@ namespace detail w = x1 * x1 + x2 * x2; } while(w > genType(1)); - return (genType)(x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean); + return static_cast(x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean); } template