From 5c02758b152b1dd55de1f1f524c4d83169fa697a Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 8 May 2018 20:05:54 +0200 Subject: [PATCH] Tentative fix GTX_easing on Apple Clang --- glm/gtx/easing.hpp | 2 +- glm/gtx/easing.inl | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/glm/gtx/easing.hpp b/glm/gtx/easing.hpp index 6fdb775b..913ca702 100644 --- a/glm/gtx/easing.hpp +++ b/glm/gtx/easing.hpp @@ -18,10 +18,10 @@ // Dependency: #include "../glm.hpp" +#include "../gtc/constants.hpp" #include "../detail/setup.hpp" #include "../detail/qualifier.hpp" #include "../detail/type_int.hpp" -#include "../gtc/constants.hpp" #ifndef GLM_ENABLE_EXPERIMENTAL # error "GLM: GLM_GTX_easing is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." diff --git a/glm/gtx/easing.inl b/glm/gtx/easing.inl index 1eb8c9dc..b1d00856 100644 --- a/glm/gtx/easing.inl +++ b/glm/gtx/easing.inl @@ -246,7 +246,7 @@ namespace glm{ if(a <= zero()) return a; else - return std::pow(static_cast(2), static_cast(10) * (a - one())); + return glm::pow(static_cast(2), static_cast(10) * (a - one())); } template @@ -259,7 +259,7 @@ namespace glm{ if(a >= one()) return a; else - return one() - std::pow(static_cast(2), -static_cast(10) * a); + return one() - glm::pow(static_cast(2), -static_cast(10) * a); } template @@ -270,9 +270,9 @@ namespace glm{ assert(a <= one()); if(a < static_cast(0.5)) - return static_cast(0.5) * std::pow(static_cast(2), (static_cast(20) * a) - static_cast(10)); + return static_cast(0.5) * glm::pow(static_cast(2), (static_cast(20) * a) - static_cast(10)); else - return -static_cast(0.5) * std::pow(static_cast(2), (-static_cast(20) * a) + static_cast(10)) + one(); + return -static_cast(0.5) * glm::pow(static_cast(2), (-static_cast(20) * a) + static_cast(10)) + one(); } template @@ -282,7 +282,7 @@ namespace glm{ assert(a >= zero()); assert(a <= one()); - return std::sin(static_cast(13) * half_pi() * a) * std::pow(static_cast(2), static_cast(10) * (a - one())); + return std::sin(static_cast(13) * half_pi() * a) * glm::pow(static_cast(2), static_cast(10) * (a - one())); } template @@ -292,7 +292,7 @@ namespace glm{ assert(a >= zero()); assert(a <= one()); - return std::sin(-static_cast(13) * half_pi() * (a + one())) * std::pow(static_cast(2), -static_cast(10) * a) + one(); + return std::sin(-static_cast(13) * half_pi() * (a + one())) * glm::pow(static_cast(2), -static_cast(10) * a) + one(); } template @@ -303,9 +303,9 @@ namespace glm{ assert(a <= one()); if(a < static_cast(0.5)) - return static_cast(0.5) * std::sin(static_cast(13) * half_pi() * (static_cast(2) * a)) * std::pow(static_cast(2), static_cast(10) * ((static_cast(2) * a) - one())); + return static_cast(0.5) * std::sin(static_cast(13) * half_pi() * (static_cast(2) * a)) * glm::pow(static_cast(2), static_cast(10) * ((static_cast(2) * a) - one())); else - return static_cast(0.5) * (std::sin(-static_cast(13) * half_pi() * ((static_cast(2) * a - one()) + one())) * std::pow(static_cast(2), -static_cast(10) * (static_cast(2) * a - one())) + static_cast(2)); + return static_cast(0.5) * (std::sin(-static_cast(13) * half_pi() * ((static_cast(2) * a - one()) + one())) * glm::pow(static_cast(2), -static_cast(10) * (static_cast(2) * a - one())) + static_cast(2)); } template