From d9124820ed293dfc017e2ca9da20cfb882661a43 Mon Sep 17 00:00:00 2001 From: Gottfried Leibniz <37632412+gottfriedleibniz@users.noreply.github.com> Date: Tue, 22 Sep 2020 00:29:59 -0300 Subject: [PATCH] fix: fastExp promotion implicit conversion increases floating-point precision: 'float' to 'double' --- glm/gtx/fast_exponential.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glm/gtx/fast_exponential.inl b/glm/gtx/fast_exponential.inl index f139e505..5b117424 100644 --- a/glm/gtx/fast_exponential.inl +++ b/glm/gtx/fast_exponential.inl @@ -112,7 +112,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType fastExp2(genType x) { - return fastExp(0.69314718055994530941723212145818f * x); + return fastExp(static_cast(0.69314718055994530941723212145818) * x); } template @@ -125,7 +125,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType fastLog2(genType x) { - return fastLog(x) / 0.69314718055994530941723212145818f; + return fastLog(x) / static_cast(0.69314718055994530941723212145818); } template