0.9.8
fast_exponential.hpp
Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 
19 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
20 # pragma message("GLM: GLM_GTX_fast_exponential extension included")
21 #endif
22 
23 namespace glm
24 {
27 
30  template <typename genType>
31  GLM_FUNC_DECL genType fastPow(genType x, genType y);
32 
35  template <typename T, precision P, template <typename, precision> class vecType>
36  GLM_FUNC_DECL vecType<T, P> fastPow(vecType<T, P> const & x, vecType<T, P> const & y);
37 
40  template <typename genTypeT, typename genTypeU>
41  GLM_FUNC_DECL genTypeT fastPow(genTypeT x, genTypeU y);
42 
45  template <typename T, precision P, template <typename, precision> class vecType>
46  GLM_FUNC_DECL vecType<T, P> fastPow(vecType<T, P> const & x);
47 
50  template <typename T>
51  GLM_FUNC_DECL T fastExp(T x);
52 
55  template <typename T, precision P, template <typename, precision> class vecType>
56  GLM_FUNC_DECL vecType<T, P> fastExp(vecType<T, P> const & x);
57 
60  template <typename T>
61  GLM_FUNC_DECL T fastLog(T x);
62 
65  template <typename T, precision P, template <typename, precision> class vecType>
66  GLM_FUNC_DECL vecType<T, P> fastLog(vecType<T, P> const & x);
67 
70  template <typename T>
71  GLM_FUNC_DECL T fastExp2(T x);
72 
75  template <typename T, precision P, template <typename, precision> class vecType>
76  GLM_FUNC_DECL vecType<T, P> fastExp2(vecType<T, P> const & x);
77 
80  template <typename T>
81  GLM_FUNC_DECL T fastLog2(T x);
82 
85  template <typename T, precision P, template <typename, precision> class vecType>
86  GLM_FUNC_DECL vecType<T, P> fastLog2(vecType<T, P> const & x);
87 
89 }//namespace glm
90 
91 #include "fast_exponential.inl"
GLM_FUNC_DECL vecType< T, P > fastLog(vecType< T, P > const &x)
Faster than the common exp2 function but less accurate.
GLM_FUNC_DECL vecType< T, P > fastPow(vecType< T, P > const &x)
Faster than the common pow function but less accurate.
Definition: _noise.hpp:11
GLM_FUNC_DECL vecType< T, P > fastExp(vecType< T, P > const &x)
Faster than the common exp function but less accurate.
GLM_FUNC_DECL vecType< T, P > fastExp2(vecType< T, P > const &x)
Faster than the common exp2 function but less accurate.
GLM_FUNC_DECL vecType< T, P > fastLog2(vecType< T, P > const &x)
Faster than the common log2 function but less accurate.