Browse Source

Tentative fix GTX_easing on Apple Clang

Christophe Riccio 7 years ago
parent
commit
5c02758b15
2 changed files with 9 additions and 9 deletions
  1. 1 1
      glm/gtx/easing.hpp
  2. 8 8
      glm/gtx/easing.inl

+ 1 - 1
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."

+ 8 - 8
glm/gtx/easing.inl

@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>