summaryrefslogtreecommitdiffstats
path: root/external/include/glm/gtx/fast_exponential.inl
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-08-21 17:40:38 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-08-21 17:40:38 +0200
commit2877f4eda3d1b0c7431039e3142ecf1a282a34b1 (patch)
tree58ad35e27ab2a3b8955f5adbf28f296670681ffc /external/include/glm/gtx/fast_exponential.inl
parentSmooth sun movement (diff)
downloadAltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar
AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.gz
AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.bz2
AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.lz
AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.xz
AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.zst
AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.zip
Diffstat (limited to 'external/include/glm/gtx/fast_exponential.inl')
-rw-r--r--external/include/glm/gtx/fast_exponential.inl46
1 files changed, 23 insertions, 23 deletions
diff --git a/external/include/glm/gtx/fast_exponential.inl b/external/include/glm/gtx/fast_exponential.inl
index 72f9f8f..9dfb109 100644
--- a/external/include/glm/gtx/fast_exponential.inl
+++ b/external/include/glm/gtx/fast_exponential.inl
@@ -4,19 +4,19 @@
namespace glm
{
// fastPow:
- template <typename genType>
+ template<typename genType>
GLM_FUNC_QUALIFIER genType fastPow(genType x, genType y)
{
return exp(y * log(x));
}
- template <typename T, precision P, template <typename, precision> class vecType>
- GLM_FUNC_QUALIFIER vecType<T, P> fastPow(vecType<T, P> const & x, vecType<T, P> const & y)
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fastPow(vec<L, T, Q> const& x, vec<L, T, Q> const& y)
{
return exp(y * log(x));
}
- template <typename T>
+ template<typename T>
GLM_FUNC_QUALIFIER T fastPow(T x, int y)
{
T f = static_cast<T>(1);
@@ -25,10 +25,10 @@ namespace glm
return f;
}
- template <typename T, precision P, template <typename, precision> class vecType>
- GLM_FUNC_QUALIFIER vecType<T, P> fastPow(vecType<T, P> const & x, vecType<int, P> const & y)
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fastPow(vec<L, T, Q> const& x, vec<L, int, Q> const& y)
{
- vecType<T, P> Result(uninitialize);
+ vec<L, T, Q> Result;
for(length_t i = 0, n = x.length(); i < n; ++i)
Result[i] = fastPow(x[i], y[i]);
return Result;
@@ -36,7 +36,7 @@ namespace glm
// fastExp
// Note: This function provides accurate results only for value between -1 and 1, else avoid it.
- template <typename T>
+ template<typename T>
GLM_FUNC_QUALIFIER T fastExp(T x)
{
// This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower.
@@ -81,14 +81,14 @@ namespace glm
}
*/
- template <typename T, precision P, template <typename, precision> class vecType>
- GLM_FUNC_QUALIFIER vecType<T, P> fastExp(vecType<T, P> const & x)
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fastExp(vec<L, T, Q> const& x)
{
- return detail::functor1<T, T, P, vecType>::call(fastExp, x);
+ return detail::functor1<L, T, T, Q>::call(fastExp, x);
}
// fastLog
- template <typename genType>
+ template<typename genType>
GLM_FUNC_QUALIFIER genType fastLog(genType x)
{
return std::log(x);
@@ -103,35 +103,35 @@ namespace glm
}
*/
- template <typename T, precision P, template <typename, precision> class vecType>
- GLM_FUNC_QUALIFIER vecType<T, P> fastLog(vecType<T, P> const & x)
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fastLog(vec<L, T, Q> const& x)
{
- return detail::functor1<T, T, P, vecType>::call(fastLog, x);
+ return detail::functor1<L, T, T, Q>::call(fastLog, x);
}
//fastExp2, ln2 = 0.69314718055994530941723212145818f
- template <typename genType>
+ template<typename genType>
GLM_FUNC_QUALIFIER genType fastExp2(genType x)
{
return fastExp(0.69314718055994530941723212145818f * x);
}
- template <typename T, precision P, template <typename, precision> class vecType>
- GLM_FUNC_QUALIFIER vecType<T, P> fastExp2(vecType<T, P> const & x)
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fastExp2(vec<L, T, Q> const& x)
{
- return detail::functor1<T, T, P, vecType>::call(fastExp2, x);
+ return detail::functor1<L, T, T, Q>::call(fastExp2, x);
}
// fastLog2, ln2 = 0.69314718055994530941723212145818f
- template <typename genType>
+ template<typename genType>
GLM_FUNC_QUALIFIER genType fastLog2(genType x)
{
return fastLog(x) / 0.69314718055994530941723212145818f;
}
- template <typename T, precision P, template <typename, precision> class vecType>
- GLM_FUNC_QUALIFIER vecType<T, P> fastLog2(vecType<T, P> const & x)
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fastLog2(vec<L, T, Q> const& x)
{
- return detail::functor1<T, T, P, vecType>::call(fastLog2, x);
+ return detail::functor1<L, T, T, Q>::call(fastLog2, x);
}
}//namespace glm