mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 12:41:54 +00:00
Tentative fix GTX_easing on Apple Clang
This commit is contained in:
parent
3a7168eb55
commit
5c02758b15
@ -18,10 +18,10 @@
|
|||||||
|
|
||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
#include "../gtc/constants.hpp"
|
||||||
#include "../detail/setup.hpp"
|
#include "../detail/setup.hpp"
|
||||||
#include "../detail/qualifier.hpp"
|
#include "../detail/qualifier.hpp"
|
||||||
#include "../detail/type_int.hpp"
|
#include "../detail/type_int.hpp"
|
||||||
#include "../gtc/constants.hpp"
|
|
||||||
|
|
||||||
#ifndef GLM_ENABLE_EXPERIMENTAL
|
#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."
|
# 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."
|
||||||
|
@ -246,7 +246,7 @@ namespace glm{
|
|||||||
if(a <= zero<genType>())
|
if(a <= zero<genType>())
|
||||||
return a;
|
return a;
|
||||||
else
|
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>
|
template <typename genType>
|
||||||
@ -259,7 +259,7 @@ namespace glm{
|
|||||||
if(a >= one<genType>())
|
if(a >= one<genType>())
|
||||||
return a;
|
return a;
|
||||||
else
|
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>
|
template <typename genType>
|
||||||
@ -270,9 +270,9 @@ namespace glm{
|
|||||||
assert(a <= one<genType>());
|
assert(a <= one<genType>());
|
||||||
|
|
||||||
if(a < static_cast<genType>(0.5))
|
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
|
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>
|
template <typename genType>
|
||||||
@ -282,7 +282,7 @@ namespace glm{
|
|||||||
assert(a >= zero<genType>());
|
assert(a >= zero<genType>());
|
||||||
assert(a <= one<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>
|
template <typename genType>
|
||||||
@ -292,7 +292,7 @@ namespace glm{
|
|||||||
assert(a >= zero<genType>());
|
assert(a >= zero<genType>());
|
||||||
assert(a <= one<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>
|
template <typename genType>
|
||||||
@ -303,9 +303,9 @@ namespace glm{
|
|||||||
assert(a <= one<genType>());
|
assert(a <= one<genType>());
|
||||||
|
|
||||||
if(a < static_cast<genType>(0.5))
|
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
|
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>
|
template <typename genType>
|
||||||
|
Loading…
Reference in New Issue
Block a user