master
ブランチ master
VulkanExample / dep / include / glm / gtx / fast_exponential.hpp
3.1 KB、93行 生 Blame 履歴
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/// Include <glm/gtx/fast_exponential.hpp> to use the features of this extension.
11///
12/// Fast but less accurate implementations of exponential based functions.
13
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
25namespace glm
26{
27 /// @addtogroup gtx_fast_exponential
28 /// @{
29
30 /// Faster than the common pow function but less accurate.
31 /// @see gtx_fast_exponential
32 template<typename genType>
33 GLM_FUNC_DECL genType fastPow(genType x, genType y);
34
35 /// Faster than the common pow function but less accurate.
36 /// @see gtx_fast_exponential
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
40 /// Faster than the common pow function but less accurate.
41 /// @see gtx_fast_exponential
42 template<typename genTypeT, typename genTypeU>
43 GLM_FUNC_DECL genTypeT fastPow(genTypeT x, genTypeU y);
44
45 /// Faster than the common pow function but less accurate.
46 /// @see gtx_fast_exponential
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
50 /// Faster than the common exp function but less accurate.
51 /// @see gtx_fast_exponential
52 template<typename T>
53 GLM_FUNC_DECL T fastExp(T x);
54
55 /// Faster than the common exp function but less accurate.
56 /// @see gtx_fast_exponential
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
60 /// Faster than the common log function but less accurate.
61 /// @see gtx_fast_exponential
62 template<typename T>
63 GLM_FUNC_DECL T fastLog(T x);
64
65 /// Faster than the common exp2 function but less accurate.
66 /// @see gtx_fast_exponential
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
70 /// Faster than the common exp2 function but less accurate.
71 /// @see gtx_fast_exponential
72 template<typename T>
73 GLM_FUNC_DECL T fastExp2(T x);
74
75 /// Faster than the common exp2 function but less accurate.
76 /// @see gtx_fast_exponential
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
80 /// Faster than the common log2 function but less accurate.
81 /// @see gtx_fast_exponential
82 template<typename T>
83 GLM_FUNC_DECL T fastLog2(T x);
84
85 /// Faster than the common log2 function but less accurate.
86 /// @see gtx_fast_exponential
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
90 /// @}
91}//namespace glm
92
93#include "fast_exponential.inl"