Skip to content

Commit

Permalink
Fixed 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 ef615c8 commit 024e94b
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions glm/gtx/easing.inl
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ namespace glm{
{
genType const Complementary = a - one<genType>();
genType const Two = static_cast<genType>(2);
return glm::pow<genType>(Two, Complementary * static_cast<genType>(10));

return glm::pow(Two, Complementary * static_cast<genType>(10));
}
}

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

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

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

template <typename genType>
Expand All @@ -286,7 +289,7 @@ namespace glm{
assert(a >= zero<genType>());
assert(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>()));
return std::sin(static_cast<genType>(13) * half_pi<genType>() * a) * glm::pow(static_cast<genType>(2), static_cast<genType>(10) * (a - one<genType>()));
}

template <typename genType>
Expand All @@ -296,7 +299,7 @@ namespace glm{
assert(a >= zero<genType>());
assert(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>();
return std::sin(-static_cast<genType>(13) * half_pi<genType>() * (a + one<genType>())) * glm::pow(static_cast<genType>(2), -static_cast<genType>(10) * a) + one<genType>();
}

template <typename genType>
Expand All @@ -307,9 +310,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)) * glm::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(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>())) * glm::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(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 024e94b

Please sign in to comment.