Skip to content

Commit

Permalink
Tentative fix GTX_easing on Apple Clang
Browse files Browse the repository at this point in the history
  • Loading branch information
Groovounet committed May 8, 2018
1 parent 3a7168e commit 5c02758
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion glm/gtx/easing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
16 changes: 8 additions & 8 deletions glm/gtx/easing.inl
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ namespace glm{
if(a <= zero<genType>())
return a;
else
return std::pow<genType>(static_cast<genType>(2), static_cast<genType>(10) * (a - one<genType>()));
return glm::pow<genType>(static_cast<genType>(2), static_cast<genType>(10) * (a - one<genType>()));
}

template <typename genType>
Expand All @@ -259,7 +259,7 @@ namespace glm{
if(a >= one<genType>())
return a;
else
return one<genType>() - std::pow<genType>(static_cast<genType>(2), -static_cast<genType>(10) * a);
return one<genType>() - glm::pow<genType>(static_cast<genType>(2), -static_cast<genType>(10) * a);
}

template <typename genType>
Expand All @@ -270,9 +270,9 @@ namespace glm{
assert(a <= one<genType>());

if(a < static_cast<genType>(0.5))
return static_cast<genType>(0.5) * std::pow<genType>(static_cast<genType>(2), (static_cast<genType>(20) * a) - static_cast<genType>(10));
return static_cast<genType>(0.5) * glm::pow<genType>(static_cast<genType>(2), (static_cast<genType>(20) * a) - static_cast<genType>(10));
else
return -static_cast<genType>(0.5) * std::pow<genType>(static_cast<genType>(2), (-static_cast<genType>(20) * a) + static_cast<genType>(10)) + one<genType>();
return -static_cast<genType>(0.5) * glm::pow<genType>(static_cast<genType>(2), (-static_cast<genType>(20) * a) + static_cast<genType>(10)) + one<genType>();
}

template <typename genType>
Expand All @@ -282,7 +282,7 @@ namespace glm{
assert(a >= zero<genType>());
assert(a <= one<genType>());

return std::sin(static_cast<genType>(13) * half_pi<genType>() * a) * std::pow<genType>(static_cast<genType>(2), static_cast<genType>(10) * (a - one<genType>()));
return std::sin(static_cast<genType>(13) * half_pi<genType>() * a) * glm::pow<genType>(static_cast<genType>(2), static_cast<genType>(10) * (a - one<genType>()));
}

template <typename genType>
Expand All @@ -292,7 +292,7 @@ namespace glm{
assert(a >= zero<genType>());
assert(a <= one<genType>());

return std::sin(-static_cast<genType>(13) * half_pi<genType>() * (a + one<genType>())) * std::pow<genType>(static_cast<genType>(2), -static_cast<genType>(10) * a) + one<genType>();
return std::sin(-static_cast<genType>(13) * half_pi<genType>() * (a + one<genType>())) * glm::pow<genType>(static_cast<genType>(2), -static_cast<genType>(10) * a) + one<genType>();
}

template <typename genType>
Expand All @@ -303,9 +303,9 @@ namespace glm{
assert(a <= one<genType>());

if(a < static_cast<genType>(0.5))
return static_cast<genType>(0.5) * std::sin(static_cast<genType>(13) * half_pi<genType>() * (static_cast<genType>(2) * a)) * std::pow<genType>(static_cast<genType>(2), static_cast<genType>(10) * ((static_cast<genType>(2) * a) - one<genType>()));
return static_cast<genType>(0.5) * std::sin(static_cast<genType>(13) * half_pi<genType>() * (static_cast<genType>(2) * a)) * glm::pow<genType>(static_cast<genType>(2), static_cast<genType>(10) * ((static_cast<genType>(2) * a) - one<genType>()));
else
return static_cast<genType>(0.5) * (std::sin(-static_cast<genType>(13) * half_pi<genType>() * ((static_cast<genType>(2) * a - one<genType>()) + one<genType>())) * std::pow<genType>(static_cast<genType>(2), -static_cast<genType>(10) * (static_cast<genType>(2) * a - one<genType>())) + static_cast<genType>(2));
return static_cast<genType>(0.5) * (std::sin(-static_cast<genType>(13) * half_pi<genType>() * ((static_cast<genType>(2) * a - one<genType>()) + one<genType>())) * glm::pow<genType>(static_cast<genType>(2), -static_cast<genType>(10) * (static_cast<genType>(2) * a - one<genType>())) + static_cast<genType>(2));
}

template <typename genType>
Expand Down

0 comments on commit 5c02758

Please sign in to comment.