| 1.0.2 API documentation

fast_exponential.hpp
Go to the documentation of this file.
1
14 #pragma once
15
16 // Dependency:
17 #include "../glm.hpp"
18
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_fast_exponential 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."
21 #elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
22 # pragma message("GLM: GLM_GTX_fast_exponential extension included")
23 #endif
24
25 namespace glm
26 {
29
32 template<typename genType>
33 GLM_FUNC_DECL genType fastPow(genType x, genType y);
34
37 template<length_t L, typename T, qualifier Q>
38 GLM_FUNC_DECL vec<L, T, Q> fastPow(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
39
42 template<typename genTypeT, typename genTypeU>
43 GLM_FUNC_DECL genTypeT fastPow(genTypeT x, genTypeU y);
44
47 template<length_t L, typename T, qualifier Q>
48 GLM_FUNC_DECL vec<L, T, Q> fastPow(vec<L, T, Q> const& x);
49
52 template<typename T>
53 GLM_FUNC_DECL T fastExp(T x);
54
57 template<length_t L, typename T, qualifier Q>
58 GLM_FUNC_DECL vec<L, T, Q> fastExp(vec<L, T, Q> const& x);
59
62 template<typename T>
63 GLM_FUNC_DECL T fastLog(T x);
64
67 template<length_t L, typename T, qualifier Q>
68 GLM_FUNC_DECL vec<L, T, Q> fastLog(vec<L, T, Q> const& x);
69
72 template<typename T>
73 GLM_FUNC_DECL T fastExp2(T x);
74
77 template<length_t L, typename T, qualifier Q>
78 GLM_FUNC_DECL vec<L, T, Q> fastExp2(vec<L, T, Q> const& x);
79
82 template<typename T>
83 GLM_FUNC_DECL T fastLog2(T x);
84
87 template<length_t L, typename T, qualifier Q>
88 GLM_FUNC_DECL vec<L, T, Q> fastLog2(vec<L, T, Q> const& x);
89
91 }//namespace glm
92
93 #include "fast_exponential.inl"
glm::fastLog2
GLM_FUNC_DECL vec< L, T, Q > fastLog2(vec< L, T, Q > const &x)
Faster than the common log2 function but less accurate.
glm::fastExp
GLM_FUNC_DECL vec< L, T, Q > fastExp(vec< L, T, Q > const &x)
Faster than the common exp function but less accurate.
glm::fastLog
GLM_FUNC_DECL vec< L, T, Q > fastLog(vec< L, T, Q > const &x)
Faster than the common exp2 function but less accurate.
glm::fastExp2
GLM_FUNC_DECL vec< L, T, Q > fastExp2(vec< L, T, Q > const &x)
Faster than the common exp2 function but less accurate.
glm::fastPow
GLM_FUNC_DECL vec< L, T, Q > fastPow(vec< L, T, Q > const &x)
Faster than the common pow function but less accurate.