• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /// @ref gtx_fast_exponential
2 /// @file glm/gtx/fast_exponential.hpp
3 ///
4 /// @see core (dependence)
5 /// @see gtx_half_float (dependence)
6 ///
7 /// @defgroup gtx_fast_exponential GLM_GTX_fast_exponential
8 /// @ingroup gtx
9 ///
10 /// @brief Fast but less accurate implementations of exponential based functions.
11 ///
12 /// <glm/gtx/fast_exponential.hpp> need to be included to use these functionalities.
13 
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 {
25 	/// @addtogroup gtx_fast_exponential
26 	/// @{
27 
28 	/// Faster than the common pow function but less accurate.
29 	/// @see gtx_fast_exponential
30 	template <typename genType>
31 	GLM_FUNC_DECL genType fastPow(genType x, genType y);
32 
33 	/// Faster than the common pow function but less accurate.
34 	/// @see gtx_fast_exponential
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 
38 	/// Faster than the common pow function but less accurate.
39 	/// @see gtx_fast_exponential
40 	template <typename genTypeT, typename genTypeU>
41 	GLM_FUNC_DECL genTypeT fastPow(genTypeT x, genTypeU y);
42 
43 	/// Faster than the common pow function but less accurate.
44 	/// @see gtx_fast_exponential
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 
48 	/// Faster than the common exp function but less accurate.
49 	/// @see gtx_fast_exponential
50 	template <typename T>
51 	GLM_FUNC_DECL T fastExp(T x);
52 
53 	/// Faster than the common exp function but less accurate.
54 	/// @see gtx_fast_exponential
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 
58 	/// Faster than the common log function but less accurate.
59 	/// @see gtx_fast_exponential
60 	template <typename T>
61 	GLM_FUNC_DECL T fastLog(T x);
62 
63 	/// Faster than the common exp2 function but less accurate.
64 	/// @see gtx_fast_exponential
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 
68 	/// Faster than the common exp2 function but less accurate.
69 	/// @see gtx_fast_exponential
70 	template <typename T>
71 	GLM_FUNC_DECL T fastExp2(T x);
72 
73 	/// Faster than the common exp2 function but less accurate.
74 	/// @see gtx_fast_exponential
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 
78 	/// Faster than the common log2 function but less accurate.
79 	/// @see gtx_fast_exponential
80 	template <typename T>
81 	GLM_FUNC_DECL T fastLog2(T x);
82 
83 	/// Faster than the common log2 function but less accurate.
84 	/// @see gtx_fast_exponential
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 
88 	/// @}
89 }//namespace glm
90 
91 #include "fast_exponential.inl"
92